dedecms使用sql语句批量维护网站内容

dedecms使用sql批量维护网站内容:

1.将所有文档设置为“仅动态”:update dede_archives set ismake=-1
2.将所有文档设置为“仅静态”:update dede_archives set ismake=1

头条[h]推荐[c]幻灯[f]特荐[a]滚动[s]加粗图片[p]跳转[j]

sql批量删除全部文章

DELETE FROM dede_addonarticle
DELETE FROM dede_arctiny
DELETE FROM dede_archives

删除标题小于5个字的文档
DELETE FROM dede_addonarticle where aid in(select id from dede_archives where LENGTH(title)<10)
DELETE FROM dede_arctiny where id in(select id from dede_archives where LENGTH(title)<10)
DELETE FROM dede_archives where LENGTH(title)<10

删除内容小于100个字的文档
DELETE FROM dede_arctiny where id in(select aid from dede_addonarticle where LENGTH(body)<50)
DELETE FROM dede_archives where id in(select aid from dede_addonarticle where LENGTH(body)<50)
DELETE FROM dede_addonarticle where LENGTH(body)<50 dede

支付宝扫码打赏 微信扫码打赏

如果本文对你有帮助,欢迎打赏本站

喜欢 ()or分享
    匿名评论
  • 评论
人参与,条评论