Re: mysql problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jed R. Brubaker wrote:
I have a PHP script that populates a database table. No big deal. It creates mailing labels. However, a weird things keeps happening - every once in a while, a query is run twice. It is the same query, same information, even the same time (there is a now() in the query - and it is identical).

create a unique index on the table so that it CAN'T possibly create duplicate rows. this will cause the problematic part of your php script to start choking with errors about duplicate keys (assuming you're checking the return status of your mysql_query()'s.... which you should always be doing!!). this should help you isolate the problem.


-jsd-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux