zinnerz Posted July 11, 2006 Share Posted July 11, 2006 Dear friends,I want to doing mass replace in order to change smiley code in all posts, example:(the text is in post table > text row)you're very funny :smiley1:How to replace all :smiley1: to :funny: in entire post?Thanks before :) Link to comment https://forums.phpfreaks.com/topic/14318-search-and-replace-in-mysql-how-to/ Share on other sites More sharing options...
Wildbug Posted July 11, 2006 Share Posted July 11, 2006 From the MySQL manual -- [url=http://dev.mysql.com/doc/refman/5.0/en/string-functions.html]string functions[/url]:[code]REPLACE(str,from_str,to_str) Returns the string str with all occurrences of the string from_strreplaced by the string to_str. REPLACE() performs a case-sensitivematch when searching for from_str. mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww'); -> 'WwWwWw.mysql.com'This function is multi-byte safe.[/code] Link to comment https://forums.phpfreaks.com/topic/14318-search-and-replace-in-mysql-how-to/#findComment-56412 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.