1. Been a while since I needed some help...

    Date: 04/19/06 (PHP Community)    Keywords: php, database, sql

    ...and this is more of a "what's the best way to do this" question.

    I have a php script that's long and complicated. Essentially it does this (in number form, because it's easier to think that way):


    1. Queries an database DB1 for membership figures, based on an expiry date.
    2. Counts the number of rows found.
    3. For each row, the script:
      1. selects the first record from the table,
      2. stores the information in an array
      3. clears all records from a table in DB2
      4. loads the information from the array into the now-empty table in DB2.
      5. builds an email using PHPMailer using a single, never-changing email address
      6. passes the mail to a mail server for delivery. This mail server has the email address from the previous step loaded as a SQL distribution list, so it queries DB2 to get its information.
      7. Send an update query to DB1 to change the expiry date.
    4. At the end of all rows, the script again empties the table in DB2, so that no data is left that could cause problems later.


    Now, i've discovered that the script is faster than the mail server when it comes to SQL queries, and if I don't put in a usleep(); call in the script, the table will be emptied again by the time the mail server goes to check, which means the mail won't be delivered.

    I've set the max_execution_time to 60 seconds in php.ini and the usleep to 500000 (half a second), but I'm still not getting any more than 20-something emails sent before the script hits the max_execution_time. I plan on later setting up a cron job to hit the script at regular times (outside work hours, so the mail server is free for our particular mailouts).

    What's the best value for me to put into usleep to allow the mail server (MDaemon 7.0.1) to collect its information and then let the script go ahead as fast as possible -- you know, the most mail out in the shortest time possible?

    Just in case I've missed something, is there possible a better way to design this (for version 2)?
  2. Source: http://community.livejournal.com/php/441047.html

  3. Myspace.com is hiring .NET developers!

    Date: 04/19/06 (C Sharp)    Keywords: programming, software, asp, sql, web, yahoo, microsoft

    They are hiring developers like crazy! Email your resume to myspacejobs@yahoo.com.

    Job description: .Net Developer-ASP.Net and C# (1.1 and 2.0)

    Social Networking is one of the hottest sectors on the web in recent years. MySpace.com has emerged as the definitive leader in this space and is the 2nd highest trafficked site on the Internet. MySpace has 210 employees and is in rapid growth mode.

    The .NET Team at MySpace.com focuses on performance and scalability to a degree that most developers have never had a chance to experience.

    Required Skills/Experience:
    - 2+ years of solid C# experience
    - 2+ years of ASP.NET (and the .NET 1.1 Framework) experience
    - 2+ years of experience developing with SQL Server 2000 (including stored procedures)
    - Strong knowledge of .NET Remoting (including HTTP and TCP/IP) and UDP
    - a solid foundation in n-tier, Business Objects, Design Patterns, and general OOP
    - Strong knowledge (and wisdom) of IIS6 and it's internals
    - Experience on sites under heavy loads that require meticulous attention to coding practices as they relate to performance and scalability

    Preferred but not required Experience:
    - Microsoft Pattern and Practice Team's Enterprise Application Blocks
    - Agile Software Development (including Extreme Programming)
    - Microsoft Application Center Test
    - LLBLGen
    - NUnit
    - nANT
    - Visual Studio 2005 (including Team System)
    - ASP.NET 2.0, ADO.NET 2.0, AJAX (Atlas), and the .NET 2.0 Framework
    - SQL Server 2005 feature set, enhancements, and changes that effect developers
    - ReSharper & dotTrace (from JetBrains)

    Source: http://community.livejournal.com/csharp/59216.html

  4. myspace.com is hiring .NET developers!

    Date: 04/19/06 (Asp Dot Net)    Keywords: programming, software, asp, sql, web, yahoo, microsoft

    They are hiring developers like crazy! Email your resume to myspacejobs@yahoo.com.

    Job description: .Net Developer-ASP.Net and C# (1.1 and 2.0)

    Social Networking is one of the hottest sectors on the web in recent years. MySpace.com has emerged as the definitive leader in this space and is the 2nd highest trafficked site on the Internet. MySpace has 210 employees and is in rapid growth mode.

    The .NET Team at MySpace.com focuses on performance and scalability to a degree that most developers have never had a chance to experience.

    Required Skills/Experience:
    - 2+ years of solid C# experience
    - 2+ years of ASP.NET (and the .NET 1.1 Framework) experience
    - 2+ years of experience developing with SQL Server 2000 (including stored procedures)
    - Strong knowledge of .NET Remoting (including HTTP and TCP/IP) and UDP
    - a solid foundation in n-tier, Business Objects, Design Patterns, and general OOP
    - Strong knowledge (and wisdom) of IIS6 and it's internals
    - Experience on sites under heavy loads that require meticulous attention to coding practices as they relate to performance and scalability

    Preferred but not required Experience:
    - Microsoft Pattern and Practice Team's Enterprise Application Blocks
    - Agile Software Development (including Extreme Programming)
    - Microsoft Application Center Test
    - LLBLGen
    - NUnit
    - nANT
    - Visual Studio 2005 (including Team System)
    - ASP.NET 2.0, ADO.NET 2.0, AJAX (Atlas), and the .NET 2.0 Framework
    - SQL Server 2005 feature set, enhancements, and changes that effect developers
    - ReSharper & dotTrace (from JetBrains)

    Source: http://community.livejournal.com/aspdotnet/62694.html

  5. Backup SQL Server 2000 to SQL

    Date: 04/21/06 (Asp Dot Net)    Keywords: database, sql

    Is there a way to backup an entire database in SQL Server 2000 to a SQL script file? I know you can copy tables and structures to a file, but I want EVERYTHING.. like the values that are in those tables as well. I can't find anything in SQL Server that does this, but people seem to be telling me that it can be done (without telling me exactly HOW of course.) Can anyone help with this?

    Source: http://community.livejournal.com/aspdotnet/63193.html

  6. Admin stuff

    Date: 04/21/06 (MySQL Communtiy)    Keywords: php, mysql, database, sql

    * EDIT
    I figured it out.
    The host name was wrong. I was using localhost when it should have been the host name of the server.
    thanks for the help.



    I just started doing some admin on a MySql database. I was hoping some of you may be able to answer a few questions for me.

    1) My user table has the following rows:

    mysql> SELECT host, user from user;
    +--------------------------+------+
    | host                     | user |
    +--------------------------+------+
    | localhost                |      |
    | localhost                | root |
    | vipindo1.securesites.net |      |
    | vipindo1.securesites.net | root |
    +--------------------------+------+
    4 rows in set (0.00 sec)
    

    What I would like to know is what the are NULL users? When I create a new user using GRANT I dont get a NULL user to match.



    2)I want to create a user for my PHP scripts to run. I used this:

    GRANT SELECT ON vipinjry.* TO user@localhost IDENTIFIED BY 'password';

    When I connect from the command line it works fine. However when I use it on a script it does not work, I get an access denied for user error. I am trying to connect to the database using php's mysql_connect() function. I have used my root user to connect and it all works great, its only the users that I create that are not working. Is the host wrong? It's currently set to localhost.

    Thanks for any help.

    Source: http://community.livejournal.com/mysql/93596.html

  7. Unusable column names?

    Date: 04/22/06 (PHP Community)    Keywords: php, mysql, database, sql

    Whilst using PHP and MySQL I noticed that I just get an error if I try to update (or do anything with) any field with the names unique and read in the database, forcing me to have to change the names in teh database.

    For instance, I'd get an error if I do this:


    At the moment to counter that, I've had to rename 'read' to 'opened' and it works fine, but I was just wondering if there was a way that I could actually use 'read' without getting an error.

    Source: http://community.livejournal.com/php/442711.html

  8. date/time formatting

    Date: 04/22/06 (PHP Community)    Keywords: php, mysql, database, sql

    In my MySQL database is a field realdate of type datetime. I am trying to convert that string (yyyy-mm-dd hh:mm) into a different format using PHP. The format I want is d/m/yy, h:mm which I gather from the manual is specified by this: j/n/y, g:i.

    Question is, how do I use PHP to format the string that MySQL outputs?

    Outputting the string without any manipulation produces the correct dates/times. When I try using date() all my dates read 1/1/70, 10:00. No difference when I tried using strtotime().
    $post_realdate_raw = $post_result['realdate'];
    $post_realdate = date("j/n/y, g:i", $post_realdate_raw);


    If anyone would be so kind as to explain what I'm doing wrong, I would be most grateful. TIA!

    Source: http://community.livejournal.com/php/442458.html

  9. IIS Issues

    Date: 04/24/06 (Asp Dot Net)    Keywords: database, sql, web

    I asked about this issue a while back here, but I have found out some more information that may better help people diagnose or point me on the right path of this issue.

    We have a document management system that uses Windows 2000 (server?) and IIS 5. The same machine also has SQL Server 2000 installed on it which it uses. Basically this program has had issues for a while, primarily that after a while various functions of the web app will just stop working. No one knows what is causing these errors, but all we DO know is that this is "fixed" by restarting IIS. Typically this would happen like once in a while, but we had to restart this like 3 times in the past month. I don't have tons of access to this server, but I'm wondering if there's anything I can tell the tech guys to look at or perhaps monitor to help us better diagnose this issue. I have access to the source code, but obviously I can't "run" it on the live server. This server hosts this one web app, and this one database, so its not like there's multiple programs running that could be bogging it down.

    Thanks.

    Source: http://community.livejournal.com/aspdotnet/63389.html

  10. Might be a beginner question...

    Date: 04/25/06 (PHP Community)    Keywords: php, mysql, sql

    Solved:see bottom of post for more info.

    I have a .sql file that has 3 commands in it.
    2 "Create Tables table' followed by a "Insert Into table"

    Each command is terminated with a ;

    If I copy the text directly into MySQL. no problems.

    I'm trying to get a php file to run the information in the page.

    Below the cut is what I tried, what happened, and what I realized:

    I tried:

    echo "Creating tables and data for $sql_file_name...";
    $str = file_get_contents($filePath . $sql_file_name);
    if (mysql_query($str)) {
    	echo " Done.
    \n"; } else { echo mysql_errno() . ": Error on query for sqlfile $sql_file_name: " . mysql_error() . "
    \n"; die; }
    The runtime came back with
    1064: Error on querry for sqlfile address.sql:
    You have an error in your SQL syntax;
    check the manual that corresponds to your MySQL server version for
    the right syntax to use near ';
    CREATE TABLE `Address_Type`
    ( `AddType_UID` int(50) NOT NULL auto_increment' at line 15
    My guess is that since PHP queries are submitted without a semi-colon that this tripped up the system. So my question:

    Is there a php command: Run_sql_in_file($filepath) ... or
    Is there a way to split my .sql string that I'm getting from file_get_contents() into an array split by the semicolon character?

    If not obvious I am quite new to PHP and pretty much self teaching as I go.

    Thanks!

    SOLVED:

    I found the explode() command. '[info]'zimzat posted at about the same time.

    I'm on the way out, but will post the final function I generated later if people are interested.

    Source: http://community.livejournal.com/php/444038.html

  11. Security?

    Date: 04/24/06 (PHP Community)    Keywords: php, mysql, html, sql, security, web, spam

    Hi everyone,

    I'm looking for some advice on some simple security measures. I deal with a political web site that wouldn't necessarily be sticking its neck out for malicious attacks but has received some spam attention on its forms already, and I worry as we store more data in a MySQL db (is it wrong to store a mailing list there?) that an injection could get in and send out sensitive information or potentially attack our larger parent organization that provides us with server space.

    Basically I have the same kind of simple form doing the same thing in a few instances of the web site. The form has about 20 fields, most type text some textarea, and a few of type file (for resumes, applications, etc). I don't currently copy any of the files to the server because I don't have access to, so I email them (via PHP) to myself or whoever the coordinator is. I don't currently have anything in place except for strip slashes and/or remove html in some cases, but I know that these measly little concoctions don't do anything to protect me from a sophisticated (or hell, even newbie) attack.

    What kinds of things should I be doing? I should probably be processing strings to make sure that they don't have any sql in them or make it so that the user is blocked from having access to damaging things, but I don't know what signifiers to look for or even what functions to use. Anyone have any basic suggestions or advice, or a link to a source that might help me beef up my data police? Thanks in advance!

    Source: http://community.livejournal.com/php/443711.html

  12. something wrong w/ this code?

    Date: 04/25/06 (PHP Community)    Keywords: database, sql

    I have a function/wrapper for basic SQL functionality, that looks like so:

    function NRE_Insert( $strSQL )
    {
    $db = mssql_connect( $db_host, $db_user, $db_pass ) or die ( "couldnt connect to server" );
    mssql_select_db( $db_name, $db ) or die ("couldnt connect to database." );

    $sql_result = mssql_query( $strSQL ) or die ("couldnt execute query" );
    }

    I'm calling it like so:

    $strSQL = "Insert Into AMGvenues(venueName, venueLink) Values('$venueName', '$venueLink')";

    NRE_Insert( $strSQL );

    Everything looks fine to me, but I'm constantly getting the "couldn't execute query" message. As far as I can tell, I do have the correct DB permissions (this is MS SQL Server, btw).

    does anything look blatantly wrong to you guys? It's 1am, and I'm just not seeing the problem clearly anymore.

    thanks.

    Source: http://community.livejournal.com/php/444381.html

  13. PHP Links/Link Exchange Scripts

    Date: 04/26/06 (PHP Community)    Keywords: mysql, sql

    Can anyone recommend a good one? Especially if you have experience with it, anything you can share would be helpful. I've been poring through the huge variety of them on sites like Hot Scripts, but I'm thinking I need to hear from people who may have used them.

    I'd be tempted to just write my own, but I'm looking for something pre-made. Commercial is fine, if your recommendation is of that nature.

    EDIT: It has to be able to use a MySQL backend.

    Source: http://community.livejournal.com/php/444759.html

  14. Cannot automate copying to file?

    Date: 04/26/06 (SQL Server)    Keywords: database, sql, microsoft

    I'm attempting to put a simple copy-to-file into a DTS package as the last step of a sequence of events. What I want it to do is take a table and copy that table to a plain text file. Whether or not that file physically exists when I try to do this, the same thing happens. (It can physically exist because I'm capable of doing this manually with Import/Export Data; I'd just like to automate it, as this will be a monthly procedure.)

    I put in the source (SQL Server) and the Destination (Text file), set up the properties on those, then add the data pump task. The data pump task defaults to the same text file as is used in the source step. (This is both attempting to use the same SQL server connection as in the first step-- which is called edi-- and attempting an entirely new connection to the same database-- which is called, imaginatively, edi2.) I click the "Define columns..." button, click "populate from source," and get the columns accurately. I then hit "Execute," the box goes away, and the "columns" listbox on the destination tab is left completely blank. If I hit "define columns..." again, I get the following error, and the two numbers are the same every time:

    The instruction at "0x4173d23a" referenced memory at "0x01591eb8". The memory could not be "written". Click on OK to terminate the program.

    I only managed to find one reference to the 0x417 number, and the reference turned out to be out of date (it 404ed on me). Everything Microsoft has about the generic error has to do with OLAP or things running in parallel; I'm not dealing with OLAP, and I'm not even running the package, just trying to biold it, so no help there.

    Anyone seen anything like this? Got any ideas? Thanks.

    Source: http://community.livejournal.com/sqlserver/47511.html

  15. Tools

    Date: 04/27/06 (SQL Server)    Keywords: sql

    What tools do you guys use for direct access to SQL Server? I am on Windows 2000 Pro, and right now use Access through a DSN. Is there a better way?

    Source: http://community.livejournal.com/sqlserver/47667.html

  16. Creating a database

    Date: 04/28/06 (WebDesign)    Keywords: php, mysql, database, sql, web

    Hello all. I am in the process of starting a member's section for the website at my job. My boss wants members to be able to login and view information that is specific to them.. such as pricing, sales history, etc. What I'm wanting to know is what is the best way to go about doing this? A PHP/MySQL database? Something different? This will be my first time doing anything like this. I'm really looking forward to it as I'll be able to learn some new and interesting things, but where's a good place to start? I appreciate any suggestions you guys can offer. You're all always such a huge help!

    Source: http://community.livejournal.com/webdesign/1101500.html

  17. SQL Help

    Date: 04/30/06 (MySQL Communtiy)    Keywords: php, sql

    I've got a MOD for remembering IP addresses when someone registers on the forum and I can figure everything else out except for how to SQL something. I'm totally lost. Here's the part in the MOD that I don't get:

    #-----[ SQL ]-------------------------------------------
    #
    ALTER TABLE phpbb_users ADD user_regip CHAR(8) NOT NULL DEFAULT '0';
    #


    That's the very first thing I have to do and I can't figure out where/how to do that.

    Anyone? Help? Please?

    Kristi

    Source: http://community.livejournal.com/mysql/94109.html

  18. Tracking Users with dynamic content

    Date: 05/03/06 (MySQL Communtiy)    Keywords: php, mysql, sql

    So I have been crafty and created a site that uses only a couple pages(PHP+MySQL)... but now I fear I wont be able to track how my users use my site. The navigation is such that if they pick a category from a list, the query returns limited results (for that category only).

    How do I track which category users are selecting? If it helps the categories are listed in their own table.

    Source: http://community.livejournal.com/mysql/94367.html

  19. Finite State Machine: Compact Representation?

    Date: 05/03/06 (Algorithms)    Keywords: mysql, database, sql

    I've got a large transition matrix (2000+ states) that is pretty sparse (most transitions are 0 probability). Right now I'm storing the thing in a MySQL database, and generating sequences based on the probability matrix is soooo slow.

    There must be a more compact way to represent these transition probabilities, so that I don't have to do a query on a 2000+ row x 2000+ column database table every iteration of the system. But I don't know how.

    Any thoughts?

    Source: http://community.livejournal.com/algorithms/75944.html

  20. Improving myself

    Date: 05/04/06 (Web Development)    Keywords: php, mysql, css, html, sql, web

    Hello!
    I was wondering if I could get some advice on how to increase my skills as a web programmer and become more marketable. I know HTML backward and forwards, know quite a bit of PHP (especially in conjuction with MySQL) and CSS. I recently bought one of Eric Myer's books on CSS. It gave me ideas for layouts and such but didn't really expand my knowledge much. I also have a Sams 21 days book on .Net for a VB programmer (which I used to be till I didn't have access to Visual Studio). I thought about learning .Net but .Net requires the Visual Studio IDE and a server with .Net support, neither of which I have. What next? Should I go with AJAX maybe ? Also, I am a programmer, not a designer and would like to improve the artisitc side so my sites don't look as bad as they do now. Is there a list of topics every web developer should know before moving to other topics? Any advice would be greatly appreciated! Thanks!




    If you would like to look at my site, it is here

    Source: http://community.livejournal.com/webdev/318007.html

  21. MySQL issues security fix

    Date: 05/04/06 (Security)    Keywords: mysql, software, database, sql, security

    Security patch is designed for the latest versions of MySQL's open-source database software.

    Source: http://news.zdnet.com/2100-1009_22-6068514.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home