phpcmsv9 后台统计编辑发稿数量

直切正题:

每个人,每个栏目,发稿数量统计

SELECT a.realname AS 姓名, c.catname AS 栏目名称, count(1) AS 发稿量
FROM v9_news bz, v9_category c, v9_admin a
WHERE bz.inputtime >= UNIX_TIMESTAMP(‘20130101000000’)
AND bz.inputtime <= UNIX_TIMESTAMP(‘20131231235959’)
AND bz.islink = 0
AND bz.status = 99
AND bz.catid = c.catid
AND bz.username = a.username
GROUP BY bz.username, bz.catid
每个人,发稿总数量
SELECT a.realname AS 姓名, count(1) AS 发稿量
FROM v9_news bz, v9_category c, v9_admin a
WHERE bz.inputtime >= UNIX_TIMESTAMP(‘20130101000000’)
AND bz.inputtime <= UNIX_TIMESTAMP(‘20131231235959’)
AND bz.islink = 0
AND bz.status = 99
AND bz.username = a.username
GROUP BY bz.username

文章链接:,本站部分内容来自互联网,如不慎侵害的您的权益,请告知,我们将尽快删除!

发表评论