Jump to content

SQL Update with wildcards ?!


Adastra

Recommended Posts

I need some quick help - I wanna run a UPDATE with a wildcard to mass edit the first part of an URL. What I've got in my database are things like http://myorldurl.net/images/myimage1.gif - with tons of different images or course. But what I wanna do is only change the  http://myorldurl.net to http://mynewurl.org.

How do I do that? I've tried UPDATE table SET url="http://mynewurl.org/%" WHERE url="http://myorldurl.net/%", but unfortunately that didn't work :/ I know there is some other way to do that, which probably involves LEFT or RIGHT statement, but I'm pretty clueless right now.

Thanks in advance!
Link to comment
https://forums.phpfreaks.com/topic/35950-sql-update-with-wildcards/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.