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

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
asno
Forum Newbie
Posts: 1
Joined: Thu Jun 13, 2002 11:00 am

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

Post 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?
chris12295
Forum Contributor
Posts: 113
Joined: Sun Jun 09, 2002 10:28 pm
Location: USA
Contact:

Post by chris12295 »

It might be a code error, give us your code and we'll go from there.
Brian
Forum Contributor
Posts: 116
Joined: Thu Apr 18, 2002 5:33 pm

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

Post by Brian »

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

What results are being returned for your query?
Post Reply