MySQL query giving error 1064 - any ideas?

This request:

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

gives:

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

Does anyone know why? Thanks in adv.

+5
source share
1 answer

Full text is a reserved word.

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

rename your field or put it in backticks `` '' (alt + 96)

So:

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

All Articles