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 :) Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.