批量替換文章縮略圖地址
1 update dede_archives set litpic=(REPLACE(litpic,/style/images/,/uploads/style/images/));批量替換正文內容超鏈接:
1 update dede_addonarticle set body=replace(body,href=http://www.baidu.com,href=h...批量替換文章縮略圖地址:
1 update dede_archives set litpic=(REPLACE(litpic,'/style/images/','/uploads/style/images/'));批量替換正文內容超鏈接:
1 update dede_addonarticle set body=replace(body,'href="http://www.baidu.com','href="http://www.xiuzhanwang.com');批量替換正文內容:
1 update dede_addonarticle set body=replace(body,'原來的字符','替換后的字符')批量替換正文中圖片路徑:
1 update dede_addonarticle set body=replace(body,'/uploads/','/目錄/uploads/');批量替換文章標題:
1 update 'dede_archives' set title=replace(title,'百度','谷歌');批量替換描述中關鍵詞:
1 update 'dede_archives' set description=replace(description,'百度','谷歌');批量替換文章發布作者:
1 update dede_archives set writer='你需要修改的作者' WHERE writer='修改后';批量替換文章來源:
1 update dede_archives set source='你需要修改的來源' WHERE source='修改后';SQL替換命令:
1 2 3 4 UPDATE 表名 SET 字段 = REPLACE(字段,'替換內容','替換值') 表名dede_archives 字段litpic (這是文章列表的圖片縮略圖) 表名dede_addonarticle 字段body (這是新聞文章內部的圖片) 表名dede_addonimages 字段imgurls (這是圖集文章內部的圖片)新聞熱點
疑難解答