Thread: double insert
View Single Post

   
  #5 (permalink)  
Old 02-28-2008, 11:27 AM
Jerry Stuckle
 
Posts: n/a
Default Re: double insert

Almaleh wrote:
>> It won't, unless you're calling the script twice.

> Only one time, I'm sure.
>
>> Echo a message every time you execute it and see what you get.

> Nothing, the script is simple and without problem in its syntax
>
> "Insert into"... inserted in phpmyadmin is ok : only one record
> inserted, but with the previous php script, it's bad (although with
> another table, it's ok)
>
> Francois
>
>


The code you posted will only insert twice if you call it twice.

Try putting the following in your code:

echo "I'm inserting a new record now<br>\n";

And see if you don't get two messages.

Either that or you're inserting in another place, also. Comment out the
mysql_query statement and see if it's getting inserted at all.

One or the other is happening.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote