Skip to content

Instantly share code, notes, and snippets.

@Maqsim
Last active December 22, 2015 05:19
Show Gist options
  • Save Maqsim/6423414 to your computer and use it in GitHub Desktop.
Save Maqsim/6423414 to your computer and use it in GitHub Desktop.
mysql> UPDATE files SET href =
IF(POSITION("assignments/uploaded_files" IN href) ,
CONCAT(
"http://www.assignmentexpert.com/uploads/users_files" ,
SUBSTR(
href ,
POSITION("assignments/uploaded_files" IN href) + 26 ,
LENGTH(href) - 26
)
) ,
href
)
LIMIT 5000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment