Discuz 取各排行榜数据

1
取论坛指定版块帖子或回复(first=1 就是帖子的1楼, 如果=0 就是调用回复,fid=62 是论坛版块号):<br>
1
SELECT * FROM discuzx.pre_forum_post where first=1 and fid=62 order by tid desc

 

1
取论坛最新帖子并显示版块名称:
1
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

 

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

 

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

 

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

 

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

 

posted @   Zhou Hr  阅读(1274)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示