The Velawesomeraptor Himself (clayrobeson) wrote,
The Velawesomeraptor Himself
clayrobeson

Okay, MySQL Gurus, help a brother out...

I need to run this query on a database to replace relative image links with absolute image links so I can migrate data properly... but I can't figure out how to escape out all the naughty characters:

update POSTS set POST_CONTENT = replace(POST_CONTENT, ‘"/images/stories’, ‘"http://website.com/images/stories’);

I've got "/images set so that if they're already absolute, it will skip them instead of doubling the http://website.com in the url of the image.

Help?

me
Brainfried
Subscribe
  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 8 comments