LMSouq
php-dev Open

Update a column value, replacing part of a string

AD
Addev
1 month ago
3 views
Problem Description
I have a table with the following columns in a MySQL database [id, url] And the URLs are like: http://domain1.example/images/img1.jpg I want to update all the URLs to another domain http://domain2.example/otherfolder/img1.jpg keeping the name of the file as is. What's the query must I run?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base