Discussion: double insert
Afficher un message
Vieux 23/09/2007, 20h09   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: double insert

Almaleh wrote:
> Hello,
>
> I use php/mysql for several years, and there, an error without explanation.
>
> The PHP script below inserts an record two times, the same two times.
> Why ? Any idea ?
>
> Thank you
> Francois
>
>
> include ('connecte.csv');
> $link = mysql_connect($sql,$user,$pwd) or die("ERROR");
> mysql_select_db($db,$link);
> mysql_query("insert into listescouts (categorie,nom) values
> ('test','essai')",$link);
> mysql_close($link);
>
> With another table, no problem. Both tables were built in the same time
> (different fields of course)
>
>


It won't, unless you're calling the script twice.

Echo a message every time you execute it and see what you get.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
 
Page generated in 0,05084 seconds with 9 queries