我在MySQL数据库中有一个包含以下列的表
[id,url]
URL如下所示:
http://domain1.com/images/img1.jpg
我想将所有URL更新到另一个域
http://domain2.com/otherfolder/img1.jpg
保持文件的名称不变
我必须运行什么查询
更新URL
设置url=REPLACE(url“domain1.com/images/”、“domain2.com/otherfolder/”)
共同学习, 共同进步, 祝各位早日成为代码大神
我在MySQL数据库中有一个包含以下列的表
[id,url]
URL如下所示:
http://domain1.com/images/img1.jpg
我想将所有URL更新到另一个域
http://domain2.com/otherfolder/img1.jpg
保持文件的名称不变
我必须运行什么查询
更新URL
设置url=REPLACE(url“domain1.com/images/”、“domain2.com/otherfolder/”)