views:

26

answers:

2

I need to "add" data to a field that already contains data without erasing whats currently there. For example if the field contains HTML, I need to add additional HTML to the field. Is there a SQL call that will do this or do I need to call the data in that field, concatenate the new data to the existing data, and reload it into the database?

+3  A: 
UPDATE Table SET Field=CONCAT(Field,'your extra html');
webdestroya
+2  A: 
UPDATE myTable SET html=concat(html,'<b>More HTML</b>') WHERE id='10' 

... for example. Your WHERE would be different of course.

Jeff B