UPDATE {pre}vod SET vod_pic=REPLACE(vod_pic, ‘tu.php?tu=’, ‘http://’)
复制代码
UPDATE {pre}vod SET vod_pic=REPLACE(vod_pic, ‘img.php?url=’, '')
复制代码
替换完成后,再把图片同步到本地就可以了(不是必需同步,只是有些地址有防盗或已过期都不会显示)
或者直接在服务器里的MySQL终端
mysql> use macx
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> UPDATE mac_vod SET vod_pic=REPLACE(vod_pic,'tu.php?tu=','https://');
Query OK, 0 rows affected (3.04 sec)
Rows matched: 412962 Changed: 0 Warnings: 0
mysql> UPDATE mac_vod SET vod_pic=REPLACE(vod_pic, 'img.php?url=','');
Query OK, 0 rows affected (2.45 sec)
Rows matched: 412962 Changed: 0 Warnings: 0
发表评论