100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 织梦DedeCMS后台SQL批量修改文章标签语法

织梦DedeCMS后台SQL批量修改文章标签语法

时间:2024-03-29 11:43:25

相关推荐

织梦DedeCMS后台SQL批量修改文章标签语法

使用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=”/img/’,’src=”/images/’);

例子解释:把图片路径由原来的/img/替换成/images/

4.批量替换文章模型中内容部分超链接

update dede_addonarticle set body=replace(body,’href=”’,’href=”’);

例子解释:把文章模型中的超链接由原来的http://www.yudouyudoucom替换成http://yudouyudoucom

5.批量替换文章模型中内容部分图片锚文本文字

update dede_addonarticle set body=replace(body,’/’);

例子解释:把文章模型中的图片锚文本信息由原来的替换成

6.批量替换软件模型内容部分超链接

update dede_addonsoft set introduce=replace(introduce,’href=”/images/js/test.html’,’href=”http://index.html’);

例子解释:把软件模型内容中超链接由原来的/images/js/test.html替换成http:/yudouyudoucom/index.htm

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

update dede_archives set writer=replace(writer,’’,’’);

例子解释:把文章模型中的作者由原来的替换成

8.批量替换文章模型中来源字段

update dede_archives set source=replace(source,’69阁’,’’);;

例子解释:把文章模型中的帖子来源由原来的69阁替换成

9.批量替换文章命名规则

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

例子解释:把站内所有文章模型命名规则全部替换成{typedir}/{aid}.html这样一种形式

10.批量替换软件模型演示地址超链接

update dede_addonsoft set writer=replace(officialUrl,’http:/’,’’);

例子解释:把软件模型原始地址超链接由原来的http:/替换成

11.批量审核文章

update dede_archives set arcrank=0;

例子解释:arcrank=0仅动态。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。