I would like to know how to find in a table field all possible instances of a string e.g.
uploads/
and add before all of them another string e.g.
http://example.com/
My idea is to update all my records in database where the old links are not working so for instace I have something like this for a field perex
Check this car <img src="/uploads/audi.jpg">. It is fantastic!
To look like:
Check this car <img src="http://example.com/uploads/audi.jpg">. It is fantastic!
And I have hundreds of this situations in my db.
What could an update query look like? Assume we have it in one table called cars and field is called perex. We need to find there all instances of /uploads and add before the slash http://example.com/
Thanks in advance for your answer.
See:
REPLACE()INSTR()