Re: Quickly adding text to a mysql text field that is NOT empty
Posted by xclarky on 02/05/06 17:01
So basically you want to append a string or data to existing data in a
field without having to fetch the contents of that field first? Yeah,
that's possible:
UPDATE `my_table` SET `myfield` = CONCAT(`myfield`, 'newvalue');
So say the value of 'myfield' was 'John' and I ran that query, the
value of 'myfield would now be 'Johnnewvalue'. Is that what you wanted?