全百科精品资源分享
免费优质资源下载平台

dede织梦SQL命令批量修改标题、文章内容等站内内容的方法

播放按钮
全百科网免费发布推广信息

在dede织梦CMS后台的系统选项中有个“SQL命令行工具”,直接在运行SQL命令行选中“多行命令”,输入SQL命令执行就OK了。以下是一些常用的SQL命令,直接复制然后到织梦后台就能使用。

提醒:通过SQL直接操作数据库存在风险,且一旦完成操作,将不可逆转。为了数据安全,建议在使用以下命令之前先进行数据备份,路径在系统->数据库备份/还原。

以下代码中的dede_表示默认的数据库前缀,如果你在安装时有修改记得也在代码中做成修改,

dede织梦CMS标题批量替换

update dede_archives set title=replace(title,'旧标题','新标题')

织梦CMS文章作者批量替换

update dede_archives set writer=replace(writer,'旧作者','新作者');

织梦CMS文章来源批量替换

update dede_archives set source=replace(source,'旧来源','新来源');

织梦CMS文章标签批量替换

update dede_tagindex set tag=replace(tag,'旧关键字','新关键字'); 
update dede_taglist set tag=replace(tag,'旧标签','新标签');

织梦CMS文章页关键字批量替换

update dede_archives set keywords=replace(keywords,'别人的','你的');

织梦CMS文章页描述批量替换

update dede_archives set description=replace(description,'旧描述','新描述');

织梦CMS文章Url规则批量替换
(把所有文章Url规则全部替换成{typedir}/{aid}.html这样一种形式)

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

织梦CMS内容批量替换

update dede_addonarticle set body=replace(body,'旧内容','新内容')

织梦CMS缩略图批量替换

update dede_archives set litpic=replace(litpic,'旧图地址','新图地址')

织梦CMS清空所有文章SQL语句

DELETE FROM dede_addonarticle WHERE aid >= 1 and aid< =5000; 
DELETE FROM dede_arctiny WHERE id >= 1 and id< =5000; 
DELETE FROM dede_archives WHERE id >= 1 and id<=5000;

清空回收站里所有的文章

delete dede_addonarticle,dede_archives,dede_arctiny from dede_addonarticle,dede_archives,dede_arctiny where dede_addonarticle.aid=dede_archives.id and dede_arctiny.id=dede_archives.id and dede_archives.arcrank='-2'

以上内容经全百科网整理而成,如果不能满足你的需要可以联系QQ1239087776定制你所需要的功能。

Download WordPress Themes Free
Free Download WordPress Themes
Download Premium WordPress Themes Free
Download Best WordPress Themes Free Download
ZG93bmxvYWQgbHluZGEgY291cnNlIGZyZWU=
download lenevo firmware
Premium WordPress Themes Download
free online course

搜一下 获取更多

本文由全百科网分享提供,分享更多精品资源,帮助你我共同成长。

赞(1)
全百科网 » dede织梦SQL命令批量修改标题、文章内容等站内内容的方法
本站内容均来自网络收集,转载内容不代表本网站的观点及意见,仅供用户参考和借鉴。如对稿件内容及版权问题有疑议,请及时联系全百科官方邮箱: smtsg@foxmail.com

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址