What I'm trying to do its edit the information from a row adding more data, for example:
select name, obs from users where area='it'
It gives me:
name       obs
charles    vegetarian
xena       otaku
and I want to add to the their obs 'friendly hard worker'
I have tried:
update users set obs=obs+' frienly hard worker' where area='it'
but it didn't work, the result that I want is:
name       obs
charles    vegetarian frienly hard worker
xena       otaku frienly hard worker
                In MySQL, the plus sign + is an operand for performing arithmetic operations.
You need to use the CONCAT() function to concatenate strings together.
UPDATE users 
SET obs = CONCAT(obs,' frienly hard worker') 
WHERE area='it';
                        update users set obs= CONCAT('string1', column1 , 'string2', column1 , 'string3' ) where area='it'
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With