MySQL Forums
Forum List  »  Newbie

Re: How to search and replace?
Posted by: Bernhard Rieder
Date: April 30, 2018 11:15AM

Hello Peter!

I tried today again your code. And for some reason, it doesn't replace the old text with the new target-hyperlink

set @newtxt = concat( "new link is ", "https:www.here.com" );
update wp_posts set post_content = replace(post_content,'oldtext', @newtxt );

I made this video for you to demonstrate live what your code is doing on my wordpress page.

Here is the Video:
youtu.be/MJHgCrOM8-U

again.. thank you so much for your help, I really do appreciate it!

Options: ReplyQuote


Subject
Written By
Posted
Re: How to search and replace?
April 30, 2018 11:15AM


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.