Solved

Bulk "Find & Replace" Text in MySQL

Posted on 2011-03-15
2
448 Views
Last Modified: 2012-05-11
Hi,

In my Wordpress blog I have a picture in all my posts. I want to change it's current height from 500 to 400 so I want to replace in my MySQL database the text (height="500" with height="400")

WP Posts table in MySQL is : wp_posts
MySQL field where the text I want to replace is : post_content

Please let me know how I can do that.


Thanks for your help.
0
Comment
Question by:Dido123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Rik-Legger earned 500 total points
ID: 35143522
This will do:

update wp_posts set post_content = replace(post_content,'height="500"','height="400"');

Open in new window

0
 

Author Closing Comment

by:Dido123
ID: 35144434
Thank you so much. It worked!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
clicking to find my folders on wamp 8 47
Archiving/Deleting Old E-Mail boxes 4 57
Code planning methods/tools? 5 58
Query Task 8 23
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question