Syntax problem...wtf?

Codes here !

Moderators: egami, macek, gesf

Post Reply
bonkers
New php-forum User
New php-forum User
Posts: 45
Joined: Wed Mar 12, 2003 7:17 pm

Sun Jun 15, 2003 5:43 pm

I can't quite figure out what the syntax problem here is:

Code: Select all

UPDATE user SET info='Yo Dawg...sup?', SET email='hi@ho.com' WHERE username='bonkers'<br>
<br>
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 'SET email='hi@ho.com' WHERE username='bonkers'' at line 1


Thats the output of my code. The top part is the query and the bottom part is the error :(... I'm really stuck on this one. Thanks in advanced for the help.

liquedus
php-forum Active User
php-forum Active User
Posts: 264
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

Sun Jun 15, 2003 6:42 pm

try this:

UPDATE user SET info="Yo Dawg...sup?", email="hi@ho.com" WHERE username="bonkers";

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Sun Jun 15, 2003 11:21 pm

or this:

Code: Select all

UPDATE `database`.`user` SET info="Yo Dawg...sup?", SET email="hi@ho.com" WHERE username="bonkers";
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests