I want to replace all /thiswebsite/ to /otherwebsite/ in a field called "url" of a mysql databasetable that for example contain:
So with a query i need to replace /thiswebsite/ in all records where the "url" field STARTS with /thiswebsite/ to /otherwebsite/...
It is imortant to replace it ONLY where it occurs at the start of the url.
The REPLACE function in MySQL does not seem to be suitable since it will replace the value everywhere?
Someone told me to look at substring_index.
I'm not an expert though, so I wonder if this would do the trick, and if not if someone can help me?