MySQL “replace” is your friend

Ever had to change the filepath in the files-table after some path restructures?  MySQL “replace” is your friend:

update files set filepath = replace(filepath, 'sites/oldpath/files/','sites/newpath/files/');

Found at http://benmetcalfe.com/blog/2004/11/mysql_replace_is_your_friend/