|
Posted by Jon Drukman on 03/04/05 19:12
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-
Navigation:
[Reply to this message]
|