MySQL Forums
Forum List  »  Newbie

How to search and replace?
Posted by: Bernhard Rieder
Date: April 25, 2018 06:04PM

I am using WordPress and phpMyAdmin to access my MySQL database.

Task/Challenge:
I need to search for specific "words" in my posts and pages. I need to replace those words. I also need to add a Hyperlink and an Anchor Text.

I could find this code, which allows to replace a text within a post.

update wp_posts set post_content =
replace(post_content,'Text to find','text to replace with');

Question a:
The code doesn't allow me to add a hyperlink to the new text-replacement.
How to do that?

Question b:
The code doesn't allow me to add find and replace "words/queries" within my wordpress pages.
What's the code for the pages?

Thank you so much for any little help, appreciate it!

Options: ReplyQuote


Subject
Written By
Posted
How to search and replace?
April 25, 2018 06:04PM


Sorry, only registered users may post in this forum.

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.