MySQL查询给出错误1064 - 任何想法?

时间:2011-04-27 18:27:17

标签: mysql mysql-error-1064

此查询:

UPDATE jos_content SET fulltext='\r\n<br /> \" some other text' WHERE id=3

给出:

ERROR 1064 (42000): 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 'fulltext='\r\n<br /> \" some other text' WHERE id=3' at line 1

任何人都知道为什么? 谢谢你。

1 个答案:

答案 0 :(得分:11)

全文是一个保留字。

http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

重命名你的字段或将其放在反引号'''(alt + 96)

中 像这样:

UPDATE jos_content SET `fulltext`='\r\n<br /> \" some other text' WHERE id=3