MySQL Syntax Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

MySQL Syntax Error

Post by s.dot »

Okay, I have a problem that's bugging me. Small syntax error. Can you spot it?

Code: Select all

$ignoresql = "INSERT INTO ignore (ignored, whoignored) VALUES('$usertoignore', '".$_COOKIEї'username']."')";
mysql_query($ignoresql) or die(mysql_error());
Error I get:

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 'ignore (ignored, whoignored) VALUES('scrotaye', 'scrotaye')' at
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

'ignore' is a keyword.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Post Reply