Web Development Blog

Twitter

26 May, 2006

Find and replace text in mysql

Web Development » WordPress » Find and replace text in mysql

update TABLE_NAME set FIELD_NAME =
replace(FIELD_NAME,'find this string','replace it with this one');

Other similiar posts that you might be interested in:

2 Responses to "Find and replace text in mysql"

1 | Andy

April 8th, 2009 at 2:11 am

Avatar

Just what I needed thank you

2 | Benxamin

April 9th, 2009 at 7:40 am

Avatar

Oh HELL YES. Greatly appreciated.

I was pushing a WordPress site from development server to production server, and all the functions that called the ‘guid’ meta data from the page array were pointing back at the dev server.

This beats updating per line.

UPDATE wp_posts SET guid = REPLACE(guid, ‘dev.server.com’, ‘prod.server.com’);

Like a charm. Thanks again!

Comment Form

Interests

Web development, Web design, Open source technologies, Portal development, APIs, Web services, Social media applications, Search engine optimisation, Mobile application development, iPhone Apps, Web 2.0, Web 3.0, Latest Internet technologies

Sponsors

Advertise here