国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 帝國Empire > 正文

帝國cms調用會員名及投稿數量排名

2024-08-28 12:18:32
字體:
來源:轉載
供稿:網友

1、調用會員發布文章數

[e:loop={'SELECT?userid,?username,?count(username)?as?total?from?[!db.pre!]ecms_news?group?by?username?order?by?total?desc',0,24,0}][/e:loop]
<?=$bqno?><?=$bqr[username]?><?=$bqr[total]?>

2、只調用會員發布文章數,增加(序號、會員id)

[e:loop={'select userid, username,count(username) as num from [!db.pre!]ecms_news group by username order by num desc',0,24,0}][/e:loop]
排名號會員名文章數會員ID
<?=$bqno?><?=$bqr[username]?><?=$bqr[num]?><?=$bqr[userid]?>

注釋:在sql語句“ SELECT userid, username, count(username) as total from [!db.pre!]ecms_news group by username order by total desc ”

中的“(username)”和“group by username”中的 “username”也能用 “userid” 調用 但會出項一個問題就是 管理員的ID會與前臺會員的ID重復

即:管理員的ID=1,前臺會員的ID=1(所以管理員的ID=前臺會員的ID),最后統計出來的文章會是:管理員+前臺會員=總數

月排行

where newstime > UNIX_TIMESTAMP()-86400*30 (月:30、周:7)

舉例:月排行

[e:loop={'select userid, username,count(username) as num from [!db.pre!]ecms_news where newstime > UNIX_TIMESTAMP()-86400*7 group by username order by num desc',0,24,0}][/e:loop]
排名號會員名文章數會員ID
<?=$bqno?><?=$bqr[username]?><?=$bqr[num]?><?=$bqr[userid]?>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 工布江达县| 曲松县| 兴文县| 沾益县| 札达县| 莱阳市| 尼玛县| 宁安市| 酉阳| 获嘉县| 大埔县| 东乌珠穆沁旗| 军事| 朔州市| 凉城县| 长岭县| 安阳市| 大连市| 曲水县| 稻城县| 洪雅县| 杨浦区| 汽车| 淳化县| 江川县| 奎屯市| 璧山县| 宝坻区| 东辽县| 河南省| 阜南县| 泰宁县| 宣化县| 察隅县| 油尖旺区| 蒙山县| 呼图壁县| 南郑县| 瓦房店市| 壤塘县| 长武县|