MySQL Forums
Forum List  »  Newbie

Re: Search and Replace multiple values
Posted by: Barry Galbraith
Date: February 08, 2014 09:36PM

What I would do is something like this

UPDATE wp_content set post_content = replace(post_content,'red','black');
UPDATE wp_content set post_content = replace(post_content,'blue','black');
UPDATE wp_content set post_content = replace(post_content,'...','black');
UPDATE wp_content set post_content = replace(post_content,'...','black');

Run as many times as there are colours to replace.

Does that work for you?

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: Search and Replace multiple values
February 08, 2014 09:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.