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
相關文章
相關標籤/搜索