UPDATE table_name
SET `column_name`=REPLACE(`column_name`,'text_to_replace','text_for_replace')
WHERE condition;
-- condition(s):
-- `column_name` LIKE '%text_to_replace%';
A piece of mysql syntax to replace any occurrences appeared in certain column. Also works for substring.
Should be able to be expanded to multiple columns if needed
Should be able to be expanded to multiple columns if needed
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.