DEDECMS的SQL命令批量替換
  • 更改文章中的內容
update dede_addonarticle set body=replace(body,'原來的字符','替換后的字符')
解釋
update dede_addonarticle set body=replace(body,’軟件下載’,'插件下載’)
  • 更改縮略圖目錄
update dede_archives set litpic=replace(litpic,'原來的字符','替換后的字符')
解釋
update dede_archives set litpic=replace(litpic,’uplimg,’tupian’)
  • 批量替換文章模型中內容部分圖片鏈接路徑
update dede_addonarticle set body=replace(body,'src="http://www.sfmr1.cn/img/','src="http://www.sfmr1.cn/images/');
解釋
把圖片路徑由原來的http://www.sfmr1.cn/img/替換成http://www.sfmr1.cn/images/
  • 批量替換文章模型中內容部分超鏈接
update dede_addonarticle set body=replace(body,'href="http://www.gezhancn.com','href="http://www.sfmr1.cn');
解釋
把文章模型中的超鏈接由原來的http://www.gezhancn.com替換成http://www.sfmr1.cn
  • 批量替換文章模型中內容部分圖片錨文本文字
update dede_addonarticle set body=replace(body,'alt="http://www.gezhancn.com/','alt="http://www.sfmr1.cn/');
解釋
把文章模型中的圖片錨文本信息由原來的http://www.gezhancn.com替換成http://www.sfmr1.cn
  • 批量替換軟件模型內容部分超鏈接
update dede_addonsoft set introduce=replace(introduce,'href="http://www.gezhancncom/images/js/test.html','href="http:/www.sfmr1.cn/tag.html');
解釋
把軟件模型內容中超鏈接由原來的http://www.gezhancn.com/images/js/test.html替換成http:/www.sfmr1.cn/tag.htm
  • 批量替換文章模型中作者字段
update dede_archives set writer=replace(writer,'http://www.gezhancn.com','http://www.sfmr1.cn');
解釋
把文章模型中的作者由原來的http://www.gezhancn.com替換成http://www.sfmr1.cn
  • 批量替換文章模型中來源字段
update dede_archives set source=replace(source,'格展網絡www.gezhancn.com','格展網絡www.sfmr1.cn');
解釋
把文章模型中的帖子來源由原來的格展網絡www.gezhancn.com替換成格展網絡www.sfmr1.cn
  • 批量替換文章命名規則
update `dede_arctype` set namerule='{typedir}/{aid}.html';
解釋
把站內所有文章模型命名規則全部替換成{typedir}/{aid}.html這樣一種形式
  • 批量替換軟件模型演示地址超鏈接
update dede_addonsoft set writer=replace(officialUrl,'http:/www.gezhancn.com','http://www.sfmr1.cn');
解釋
把軟件模型原始地址超鏈接由原來的http:/www.gezhancn.com替換成http://www.sfmr1.cn
  • 批量審核文章
update dede_archives set arcrank=0;
update dede_arctiny set arcrank=0;
update dede_taglist set arcrank=0;
解釋
arcrank=0 僅動態