SQL REPLACE Statement

 

Reorganizing a website with a DB backend can be an utter nightmare, particularly when image folders are concerned. The thought of manually updating hundreds, or thousands, of posts is intimidating on a good day - and impossible on a bad day. Enter the SQL REPLACE statement: With a few solid search strings, one can quickly glue things back together. The effectiveness of this technique wanes with the number of adjustments made and how far down a directory tree the adjustments were made. If 100 folder moves were made at low levels, the effort with this increases. In contrast, if 1000's of objects were moved because a high level folder was moved to a different location, it might be that only 3 iterations of the REPACE will be needed. In my case there were several adjustments made, so the task was a bit laborious - HOWEVER using this replace statement saved hours of hunting down and updating tags. So here we go...

Tags
Subscribe to