婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > 織夢后臺SQL批量修改文章標簽語法

織夢后臺SQL批量修改文章標簽語法

POST TIME:2021-05-23 02:36

使用DedeCMS建站會遇到這樣的問題,采集來的文章有個小錯誤沒修正,需要把文章的內容批量替換下,一篇一篇的修改會十分麻煩,這里就需要用到織夢的特有功能,SQL批量替換功能,語法標簽如下:

  1.更改文章中的內容

update dede_addonarticle set body=replace(body,'原來的字符','替換后的字符')

  例子解釋:update dede_addonarticle set body=replace(body,'軟件下載','插件下載')

 

  2.更改縮略圖目錄

update dede_archives set litpic=replace(litpic,'原來的字符','替換后的字符')

  例子解釋:update dede_archives set litpic=replace(litpic,'uplimg,'tupian')

 

  3.批量替換文章模型中內容部分圖片鏈接路徑

update dede_addonarticle set body=replace(body,'src="http://dede58.com/img/','src="http://dede58.com/images/');

  例子解釋:把圖片路徑由原來的http://www.dede58.com/img/替換成http://dede58.com/images/

 

  4.批量替換文章模型中內容部分超鏈接

update dede_addonarticle set body=replace(body,'href="http://www.meiowpet.com','href="http://meiowpet.com');

  例子解釋:把文章模型中的超鏈接由原來的http://www.yudouyudoucom替換成http://yudouyudoucom

 

  5.批量替換文章模型中內容部分圖片錨文本文字

update dede_addonarticle set body=replace(body,'alt="http://www.dede58.com/','alt="http://dede58.com/');

  例子解釋:把文章模型中的圖片錨文本信息由原來的http://www.dede58.com替換成http://dede58.com

 

  6.批量替換軟件模型內容部分超鏈接

update dede_addonsoft set introduce=replace(introduce,'href="http://www.dede58.com/images/js/test.html','href="http:/dede58.com/index.html');

  例子解釋:把軟件模型內容中超鏈接由原來的http://www.dede58.com/images/js/test.html替換成http:/yudouyudoucom/index.htm

 

  7.批量替換文章模型中作者字段

update dede_archives set writer=replace(writer,'http://www.dede58.com','http://dede58.com');

  例子解釋:把文章模型中的作者由原來的http://www.dede58.com替換成http://dede58.com

 

  8.批量替換文章模型中來源字段

 

update dede_archives set source=replace(source,'69閣www.dede58.com','織夢58dede58.com');;

  例子解釋:把文章模型中的帖子來源由原來的69閣www.dede58.com替換成織夢58dede58.com

 

  9.批量替換文章命名規則

update `dede_arctype` set namerule='{typedir}/{aid}.html';

  例子解釋:把站內所有文章模型命名規則全部替換成{typedir}/{aid}.html這樣一種形式

 

  10.批量替換軟件模型演示地址超鏈接

update dede_addonsoft set writer=replace(officialUrl,'http:/www.dede58.com','http://dede58.com');

  例子解釋:把軟件模型原始地址超鏈接由原來的http:/www.dede58.com替換成http://dede58.com

 

  11.批量審核文章

update dede_archives set arcrank=0;

  例子解釋:arcrank=0 僅動態。




收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 措勤县| 濮阳县| 平南县| 富裕县| 海门市| 禹城市| 石景山区| 从江县| 赤峰市| 调兵山市| 乌海市| 长宁区| 文登市| 白银市| 兴安盟| 凌云县| 岳阳市| 巴马| 兴山县| 延庆县| 江永县| 武义县| 剑阁县| 武平县| 同心县| 钟祥市| 宁夏| 长兴县| 射阳县| 孟村| 汤原县| 扎囊县| 富民县| 马尔康县| 东方市| 富裕县| 盐边县| 牡丹江市| 龙胜| 普陀区| 七台河市|