homepage Welcome to WebmasterWorld Guest from 54.204.67.26
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
append text to end of all entries in mysql column
Rasputin




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

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!

 

whoisgregg




msg:4461371
 9:05 pm on Jun 4, 2012 (gmt 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>');

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved