You are here: Re: mysql problems « PHP « IT news, forums, messages
Re: mysql problems

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация