Archive

Posts Tagged ‘str_replace in mysql’

String replace in MySQL

December 4th, 2013 No comments

Change a part of text in a MySQL database, can execute with the command REPLACE().

Example: change HTML bold text in the ‘description’ field that uses B tag with STRONG tag.

UPDATE texts SET description = REPLACE(description, ‘B>’, ‘STRONG>’);