Discuz 取各排行榜数据

取论坛指定版块帖子或回复(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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值