dedecms中常用的数据表操作SQL语句
发布:smiling 来源: PHP粉丝网 添加日期:2014-03-12 13:31:36 浏览: 评论:0
本文章总结了几乎所有常用的dedecms数据表中记录的操作sql语句,包括有删除,审核,批量修改等等.
删除所有注册会员,代码如下:
- DELETE FROM `#@__member` WHERE `#@__member`.`mid`!= 1;
- TRUNCATE TABLE `#@__member_flink`;
- TRUNCATE TABLE `#@__member_person`;
批量修改栏目为动态,代码如下:
UPDATE `#@__arctype` SET `isdefault` = '-1'
批量删除文章,代码如下:
- DELETE FROM #@__addonarticle WHERE aid>0;
- DELETE FROM #@__arctiny WHERE id>0;
- DELETE FROM #@__archives WHERE id>0;
批量修改文章为动态显示,代码如下:
update #@__archives set ismake=-1;
批量修改文章为静态显示,代码如下:
update #@__archives set ismake=1;
批量删除所有内容为空文章,代码如下:
- 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='';
批量删除标题为空的文章,代码如下:
- 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='';
批量审核文档,代码如下:
- Update `#@__arctiny` set arcrank='0' where arcrank='-1';
- Update `#@__archives` set arcrank='0' where arcrank='-1';
批量删除未审核的文档,代码如下:
- 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';
- TRUNCATE TABLE `#@__member_space`;
- TRUNCATE TABLE `#@__member_tj`;
Tags: 数据表 操作SQL语句
相关文章
- ·织梦dedecmsv5.7数据表结构文档(超链接完整修复版) (2014-11-05)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)