Emilio- I ran into this problem just yesterday using some PHP code. The problem was in control logic. I executed the insert within an if statement, but failed to see that there was another mysql_query statement outside the if block. This caused the same insert to happen again.
Basically, in psuedo code if (found){ query = "INSERT ...." mysql_query (query) } else { query = "UPDATE ...." mysql_query (query) } mysql_query(query) Stupid logic on my part. This doesn't adress the date being blank, but I would suggest reviewing your logic to see if there is a mysql_query that is being executed 2 times. My 2 cents... Quoting Dan Greene <[EMAIL PROTECTED]>: > sending on to list while I think... ;) > > -----Original Message----- > From: Emilio Ruben Estevez [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 09, 2003 10:34 AM > To: Dan Greene > Subject: RE: When inserting data it insert 2 records one correct and one > blank! > > > Ok, here it is the full statement: > > $sql = "INSERT INTO llamadas > (destinatario,fecha,hora,apellido,nombre,telefono,mail,receptor,mensaje) > VALUES > ('$destinatario','$fecha','$hora','$apellido','$nombre','$telefono','$mail','$re ceptor','$mensaje')"; > > $result = mysql_query($sql); > > And, yes it happens to all users, and i ve tested pressing only once the > submit button but i allways got 2 records add the first one is a blank one > and the second the correct one. > > > >From: "Dan Greene" <[EMAIL PROTECTED]> > >To: "Emilio Ruben Estevez" <[EMAIL PROTECTED]>, > ><[EMAIL PROTECTED]> > >Subject: RE: When inserting data it insert 2 records one correct and one > >blank! > >Date: Thu, 9 Oct 2003 10:09:00 -0400 > > > >Emilio, > > > >Can you supply the full insert statement? Also, is this happening for all > >users, or one in particular? I ask, as I've seen issues with web app users > > >double-clicking the submit button causing similar issues.... > > > > > -----Original Message----- > > > From: Emilio Ruben Estevez [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, October 09, 2003 10:02 AM > > > To: [EMAIL PROTECTED] > > > Subject: When inserting data it insert 2 records one correct and one > > > blank! > > > > > > > > > Hi, I have a page on a intranet where workers can insert data into a > > > database, the thing is that when they type the info an press > > > submit the page > > > use the INSERT INTO db.... then when i check the data in the > > > database i can > > > see the record that the user entered and a second record that > > > is all in > > > blank, exept for the date and time field that the value is > > > 0000-00-00 and > > > 00:00:00. > > > > > > What´s wrong? maybe something of the date and time format?? Any Clue. > > > > > > Thanks. > > > Emilio. > > > > > > _________________________________________________________________ > > > Add MSN 8 Internet Software to your existing Internet access > > > and enjoy > > > patented spam protection and more. Sign up now! > > > http://join.msn.com/?page=dept/byoa > > > > > > > > > -- > > > MySQL General Mailing List > > > For list archives: http://lists.mysql.com/mysql > > > To unsubscribe: > > > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > > > > >-- > >MySQL General Mailing List > >For list archives: http://lists.mysql.com/mysql > >To unsubscribe: > >http://lists.mysql.com/[EMAIL PROTECTED] > > > > _________________________________________________________________ > High-speed Internet access as low as $29.95/month (depending on the local > service providers in your area). Click here. https://broadband.msn.com > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]