Skip to content

Instantly share code, notes, and snippets.

@siliconmeadow
Created November 4, 2013 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siliconmeadow/7303622 to your computer and use it in GitHub Desktop.
Save siliconmeadow/7303622 to your computer and use it in GitHub Desktop.
Code to do string replacement on columns in a table. Particularly useful for filename path changes in Drupal 6. Possibly D7?
UPDATE files
SET files.filepath
=
REPLACE(files.filepath,'sites/jarp.aroq.com/files','sites/default/files');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment