i have a mysql table with the follwoing fields :
id, desc, value, people, amount, weight
in the above order i run the follwoing
update match1 set weight = 5 where desc = 'fat' and id != '6';
follwoing is the error message i get :
**#1064 - You have an error in your SQL syntax; check the manual that**
corresponds to your MySQL serve开发者_如何学Pythonr version for the right syntax
to use near 'desc = 'bat' and id = 6' at line 1
can someone please let me know whats wrong with this?
the column desc
is a keyword in mysql. use backquotes i.e.
where `desc` = 'fat'
精彩评论