Page 1 of 1

PHP mysql_query running a query twice (at the same time)

Posted: Thu Jun 13, 2002 11:00 am
by asno
I am working on a large web application using PHP and MySQL. On a page that inserts a new entry into the database, I run mysql_query() once with my insert string. Two entries show up in the database, each with a new ID (indicating that for some reason, mysql_query actually ran the query twice, and the AUTO_INCREMENT field was increased for each one). If I print out the INSERT string, and type that directly into the mysql command line client, it of course only inserts one entry. Any suggestions?

Posted: Thu Jun 13, 2002 7:01 pm
by chris12295
It might be a code error, give us your code and we'll go from there.

Yes, code could be helpful for those of us who can help you.

Posted: Tue Jun 18, 2002 3:17 pm
by Brian
Yes, code could be helpful for those of us who can help you.

What results are being returned for your query?