ed22
ed22

Reputation: 1237

MySQL query giving error 1064 - any ideas?

This query:

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

Anyone has any idea why?

Upvotes: 5

Views: 4816

Answers (1)

Nicola Cossu
Nicola Cossu

Reputation: 56357

fulltext is a reserved word.

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

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

like so:

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

Upvotes: 11

Related Questions