i've got data like this:
1 street\n2street\nmycity\nmytown
What i want to do is replace \n with char(10) as i need a real linebreak in the db field.
I've got:
UPDATE data set `value` = REPLACE(`value`,'\n', char(10)) WHERE `key`='shipping_address';
But that is not working.
Can anyone help please?
data
that have a fieldkey
with the value 'shipping_address'. However I assume that you wanted to replace in every single entry of the whole data table. For this simply omit the wholeWHERE
part. – s1lence Feb 20 '12 at 13:57