Discuz 取各排行榜数据

原文链接http://www.cnblogs.com/showblog/p/3358038.html
取论坛指定版块帖子或回复(first=1 就是帖子的1楼, 如果=0 就是调用回复,fid=62 是论坛版块号):
SELECT * FROM discuzx.pre_forum_post where first=1 and fid=62 order by tid desc

 

取论坛最新帖子并显示版块名称:
SELECT a.*,b.* FROM discuzx.pre_forum_thread as a left join discuzx.pre_forum_forum as b on a.fid=b.fid order by tid desc

 

按积分排行调用论坛用户头像和名称,也可以将 credits改成regdate,就是最新注册加入的会员:
SELECT * FROM discuzx.pre_common_member order by credits desc

 

取论坛热门版块排行:
SELECT * FROM discuzx.pre_forum_forum order by threads desc

 

取论坛最热门帖子:
SELECT * FROM discuzx.pre_forum_thread order by views desc

 

取论坛最新帖子:
SELECT * FROM discuzx.pre_forum_thread order by tid desc

 

转载于:https://www.cnblogs.com/showblog/p/3358038.html

相关文章

**本资源可免费获取,请至尾部读阅!**Discuz素材资源交易论...
分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风...
最近工作需要IIS,自己的电脑又是Windows7系统,找了下安装的...
首先就是discuz,用起来真的是特别的好用,搭建的网站真的非...
1.找到图片路径拼装文件首先打开根目录下的template目录找到...
打开NavicatforMySQL找到数据表 pre_ucenter_members 把密...