Solved

Bulk "Find & Replace" Text in MySQL

Posted on 2011-03-15
2
407 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now