1、删除所有注册会员及会员信息的SQL语句
DELETE FROM `#@__member` WHERE `#@__member`.`mid`!= 1;
TRUNCATE TABLE `#@__member_flink`;
TRUNCATE TABLE `#@__member_person`;
TRUNCATE TABLE `#@__member_space`;
TRUNCATE TABLE `#@__member_tj`;
2、批量修改栏目为动态
UPDATE `#@__arctype` SET `isdefault` = \'-1\'
3、批量修改栏目为静态
UPDATE `#@__arctype` SET `isdefault` = \'1\'
4、批量删除所有文章
DELETE FROM #@__addonarticle WHERE aid>0;
DELETE FROM #@__arctiny WHERE id>0;
DELETE FROM #@__archives WHERE id>0;
5、将所有文档设置为仅动态
update #@__archives set ismake=-1;
6、将所有文档设置为仅静态
update #@__archives set ismake=1;
7、批量删除所有内容为空的文章
DELETE FROM #@__arctiny where id in(select aid from #@__addonarticle where body='');
DELETE FROM #@__archives where id in(select aid from #@__addonarticle where body='');
DELETE FROM #@__addonarticle where body='';
8、批量删除所有标题为空的文章
DELETE FROM #@__addonarticle where aid in(select id from #@__archives where title='');
DELETE FROM #@__arctiny where id in(select id from #@__archives where title='');
DELETE FROM #@__archives where where title='';
9、批量审核所有文章
Update `#@__arctiny` set arcrank='0' where arcrank='-1';
Update `#@__archives` set arcrank='0' where arcrank='-1';
10、批量删除所有未审核文章
DELETE FROM #@__addonarticle where aid in(select id from #@__arctiny where arcrank='-1');
DELETE FROM `#@__arctiny` where arcrank='-1';
DELETE FROM `#@__archives` where arcrank='-1';
更多推荐
织梦cms常用的SQL语句_dedecms
发布评论