dedecms中常用的数据表操作SQL语句
本文章总结了几乎所有常用的dedecms数据表中记录的操作sql语句,包括有删除,审核,批量修改等等.
删除所有注册会员, 代码如下:
DELETE FROM `detest_member` WHERE `detest_member`.`mid`!= 1; TRUNCATE TABLE `detest_member_flink`; TRUNCATE TABLE `detest_member_person`;批量修改栏目为动态, 代码如下:
UPDATE `detest_arctype` SET `isdefault` = '-1'
批量删除文章, 代码如下:
DELETE FROM detest_addonarticle WHERE aid>0; DELETE FROM detest_arctiny WHERE id>0; DELETE FROM detest_archives WHERE id>0;批量修改文章为动态显示, 代码如下:
update detest_archives set ismake=-1;
批量修改文章为静态显示, 代码如下:
update detest_archives set ismake=1;
批量删除所有内容为空文章 ,代码如下:
DELETE FROM detest_arctiny where id in(select aid from detest_addonarticle where body= '' ); DELETE FROM detest_archives where id in(select aid from detest_addonarticle where body= '' ); DELETE FROM detest_addonarticle where body= '' ;批量删除标题为空的文章 ,代码如下:
DELETE FROM detest_addonarticle where aid in(select id from detest_archives where title= '' ); DELETE FROM detest_arctiny where id in(select id from detest_archives where title= '' ); DELETE FROM detest_archives where where title= '' ;批量审核文档, 代码如下:
Update `detest_arctiny` set arcrank= '0' where arcrank= '-1' ; Update `detest_archives` set arcrank= '0' where arcrank= '-1' ;批量删除未审核的文档, 代码如下:
DELETE FROM detest_addonarticle where aid in(select id from detest_arctiny where arcrank= '-1' ); DELETE FROM `detest_arctiny` where arcrank= '-1' ; DELETE FROM `detest_archives` where arcrank= '-1' ; TRUNCATE TABLE `detest_member_space`; TRUNCATE TABLE `detest_member_tj`;查看更多关于dedecms中常用的数据表操作SQL语句 - DeDecms的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did5753