SQL syntax error in PHP script. dunno what's wrong
| From: | Chris Worth | Date: | Wed, 01 Aug 2001 16:35:57 +0000 |
| Subject: | SQL syntax error in PHP script. dunno what's wrong | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60694@lists.php.net to get a copy of this message | ||
hey gang.
here is my sql statement from my php script.
$sql = "UPDATE TABLE seminar SET
title=$title,speaker=$speaker,event_date=$tdate,time=$time,bldg=$building
,rm=$room WHERE id=$id";
it appears just like that in my code.
here is the $sql string echoed to the screen to verify the variables.
UPDATE TABLE seminar SET title=Something amazing,speaker=Mr.
Black,event_date=2001-08-05,time=11:00:am,bldg=BCC ,rm=201 WHERE id=48
all of the variable are valid.
here is my error.
1064: You have an error in your SQL syntax near 'TABLE seminar SET title=Something
amazing,speaker=Mr.
Black,event_date=2001-08' at line 1
I'm baffled.
and I couldn't find error 1064 in the mysql manual.pdf either.
any ideas. I know this is going to turn out to be something silly.
thanks,
chris