免费一级码无码婬片AA,多姿,国产成人精品日本亚洲18图 ,亚洲欧美视频一区,久久久久国产精品一区

做網站找實速,專業網站制作設計平臺
首頁 > 課堂 > 網站技術 > 詳情
網站標簽 / Tags

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

2020-02-16 15:36:18   來源:實速網絡|網站建設|網站設計|網站優化|網站仿制|網站SEO|網站推廣|空間域名|主機VPS|服務器|網站源碼|網站模版   瀏覽: 次
帝國cms調用會員名及投稿數量排名 發布時間:2019-12-20 來源:未知 瀏覽: 關鍵詞:帝國CMS 調用 會員名 投稿數量 排名

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

發布時間:2019-12-20 來源:未知 瀏覽: 關鍵詞:帝國CMS 調用 會員名 投稿數量 排名 

1、調用會員發布文章數

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

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

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

注釋:在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)

舉例:月排行

<table><tr><td>排名號</td><td>會員名</td><td>文章數</td><td>會員ID</td></tr>[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}]<tr><td><?=$bqno?></td><td><?=$bqr[username]?></td><td><?=$bqr[num]?></td><td><?=$bqr[userid]?></td></tr>[/e:loop]</table>
責任編輯:實速科技