RE: [PHP-DB] mysql error and resource ID:

From: Date: Thu, 14 Oct 2004 15:16:43 +0000
Subject: RE: [PHP-DB] mysql error and resource ID:
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-36805@lists.php.net to get a copy of this message
Yes, actually my apologies to everyone. I figured out the error. So , yep, I'm down to a problem with the date. The column is set to date. I'll go ahead and add the quotes. Stuart --- dpgirago@mdanderson.org wrote: > Stuart, > > The date has forward slashes. These are not > integers, right? So put single > quotes around the whole date, like '10/15/2004'. > > dave > > > > > > Stuart Felenstein <stuart4m@yahoo.com> > > 10/14/2004 10:02 AM > > > > > > To: > Stuart Felenstein <stuart4m@yahoo.com> > cc: > php-db@lists.php.net > > > > > Subject: > RE: [PHP-DB] mysql error and resource ID: > > > > Anyone see something wrong here : > > My error message is : > > "0: 1064: You have an error in your SQL syntax. > Check > the manual that corresponds to your MySQL server > version for the right syntax to use near > 'ddddd',1,'ddddddddd',1,1, 31, 33,10/15/2004))' at > line 5" > > Code: > > $query = "INSERT INTO MainTable > (RecordID,UserID,other > fields..............) > values > (null,null,'$f1a',$f2a,$f2c,$f2d,$f2e,$f2g,'$f5b','$f3m','$f3n,'$f3e',$f3f,'$f3g',$f3h,$f3i, > $f3j, $f3k,$f3l))"; //not sure if the double ) is > //needed though it doesn't make a diff > begin(); // transaction begins > $result = mysql_query($query); > > --- Stuart Felenstein <stuart4m@yahoo.com> wrote: > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

« previous php.db (#36805) next »