已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程

标题: 虎绿林系统管理SQL

作者: @Ta

时间: 2011-05-28

点击: 7459

后台地图>执行SQL
mdb:../db/user.db3 
SQL: 
select * from user where name='大老虎' #查看指定用户的信息 
update user set name='小老虎' where name='大老虎' #为指定用户改名 
update user set pass=md5('我的密码') where name='悲剧帝' #给指定用户改密码 
select uid from user where name='嘿嘿'#查看指定用户的uid 
select count(*) from user #查看注册用户总数 
select * from user limit 0,20 #查看第1~20个用户的信息。改成limit 20,20,查看第21~40个用户的信息。语法:limit 开始位置,条数 
select uid,name,qianm,lianx from user where name like '%龙%' #查找用户名中含“龙”的所有用户
mdb: ../db/bbs.db3 
SQL: 
select * from bk #查看版块
insert into bk(name,bzid) values('版块名称', ',1,2,1008,…更多版主uid…,') #新建版块。注意版主uid以逗号开始结束,逗号分隔。得到uid的方法是查询user.db3
update bk set name='新名' where name='老名'update bk set name='新名' where id=5 #版块改名。5是版块id,查看版块时可以看到
delete from bk where name='版名' #删版。同上,可以用where id=版块id
update bk set bzid=',1,5,7,1390,1101,' where id=6 #重设版主。可以用name='…'。如果去掉where及后面的内容,就是重设所有版的版主
update bk set bzid=bzid || '1353,' where id=3 #添加版主。可以改成name=。去年where和后面的内容(称为where子句)可以添加总版主。逗号不能少。
update bk set bzid=replace(bzid, ',1353,' , ',1585,') where id=3 #替换版主。可以用where name=,以后不赘述。
update tz set ztn='[顶]', youxian=2 where id=565 #置顶贴子。565是贴子id,查看方法是:贴子页存书签,看tzid=
update tz set bkid=2 where id=335 #移版
update tz set ztn='[精]' where id=565 #加精贴子。
update tz set ztn='[锁]', extra='锁贴原因' where id=565 #锁定贴子。
update tz set ztn='[底]', youxian=0 where id=565 #固底贴子。
delete from tz where uid=5 #删除指定用户的贴子。
delete from tz where id>565 and id<575 #删除id在指定范围内的贴子。
delete from tz where id in(1001, 3553, 7717) #指定多个id删贴。
update tz set fttime=fttime-36000, hftime=hftime-36000 where id>565 and id<575 #把id在指定范围内的贴子从首页移下(原理:把贴子的发贴时间提前36000秒,它们就会被之后的贴子顶下去)。

[隐藏样式|查看源码]


『回复列表(16|显示机器人聊天)』

1. 更新中ING...
(/@Ta/2011-05-28 12:52//)

2. 显示当前在线人数的是什么?以前用在首页那个
(/@Ta/2011-05-28 12:57//)

3. 没有,因为我们已经去掉了给数据库造成压力的用户上线统计。
(/@Ta/2011-05-28 13:03//)

4. 当前共有多少人注册了
(/@Ta/2011-05-28 13:05//)

5. 我绑定的tk域名+000+文件管理的名字,怎么还是显示主页?那里出错
(/@Ta/2011-05-28 13:09//)

6. 哇,刚好3333个!
(/@Ta/2011-05-28 13:38//)

7. ../(这里应该是./)db/user.db3
(/@Ta/2011-05-28 13:38//)

8. 呵呵3333
(/@Ta/2011-05-28 13:55//)

9. 我错了是../db/bbs.db3
(/@Ta/2011-05-28 14:02//)

10. 我的网站是332个注册的,其中我有两个号。
(/@Ta/2011-05-28 14:03//)

11. 老虎呀,你怎么现在才说呀!
(/@Ta/2011-05-28 15:29//)

12. 有点儿复杂,我慢慢研究
(/@Ta/2011-06-12 20:40//)

13. 这样的操作都好复杂啊……
(/@Ta/2011-06-13 20:47//)

14. 现在看起来感觉还可以,谢谢……
(/@Ta/2011-07-16 08:21//)

15. 这个怎么用啊?下载下来还是改里面的内容登网址?
(/@Ta/2011-08-22 12:25//)

16. 谢谢
(/@Ta/2011-08-24 00:55//)

回复需要登录

9月19日 19:22 星期五

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1