Hey guys I am having problems with MySQL.
Its throws me error when im using this query.
update table set column1 = 'test' where column2 = 'xy' and column3 = 'xx'
The error is:
#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 'column2 = 'xy' and column3 = 'xx'' at line 1
What am i doing wrong?
Cheers.
You need to give real names and values and real errors. How do you expect anyone to help you?
Based on your comment on @Will A’s answer, it appears that column2 is a reserved word. Try wrapping it in ticks (`) or write
tablename.columnnameinstead of justcolumnname.