Welcome to WebmasterWorld Guest from 54.146.194.42

Forum Moderators: open

Message Too Old, No Replies

append text to end of all entries in mysql column

     
8:18 am on May 10, 2012 (gmt 0)

Full Member

5+ Year Member

joined:May 25, 2006
posts: 217
votes: 7


I suspect that I am missing something very obvious but I am trying to append a few words to the end of every item in a database column:

using

UPDATE j25_content SET fulltext = CONCAT(fulltext,'<p>newtext</p>')


error message is: 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,'<p>newtext</p>')

Any advice what I missed very welcome, thanks!
9:05 pm on June 4, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


Is the actual column name
fulltext
? If so, take a look at the reserved words list [dev.mysql.com] and try to avoid those in the future. Meanwhile, use backticks around the column name and see if that helps:

 UPDATE `j25_content` SET `fulltext` = CONCAT(`fulltext`,'<p>newtext</p>');