Blog

Working with companies of all sizes to make the most of the internet.

MySql find & replace

by | 13th September 2011 | 0 comments

Having recently moved the blog from andy-powell.net to andy-powell.net I discovered that the images within the posts were now broken, I could manually go through each post and reattach the images but performing a find and replace on the MySql database would be a much quicker way of getting things back on track.

 
update [table_name] set [field_name] = replace([field_name],
'[string_to_find]','[string_to_replace]');

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Dive straight into the feedback!
Login below and you can start commenting using your own user instantly