From: Andrew Dolgov Date: Thu, 2 Mar 2006 16:21:18 +0000 (+0100) Subject: update stats X-Git-Tag: schema_freeze_for_1.1.4~24 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f26ef034b52faf09001db56d5be616dcea07c4db;p=tt-rss.git update stats --- diff --git a/stats.php b/stats.php index 007053b1..730bea25 100644 --- a/stats.php +++ b/stats.php @@ -38,10 +38,15 @@ print "

Total articles stored: $total_articles (${articles_size}K)

"; - $result = db_query($link, "SELECT COUNT(int_id) as cid,owner_uid,login +/* $result = db_query($link, "SELECT COUNT(int_id) as cid,owner_uid,login FROM ttrss_user_entries - JOIN ttrss_users ON (owner_uid = ttrss_users.id) - GROUP BY owner_uid,login ORDER BY cid DESC"); + LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id) + GROUP BY owner_uid,login ORDER BY cid DESC"); */ + + $result = db_query($link, "SELECT count(ttrss_entries.id) AS cid, + login FROM ttrss_entries + LEFT JOIN ttrss_user_entries ON (ref_id = ttrss_entries.id) + LEFT JOIN ttrss_users ON (ttrss_users.id = owner_uid) GROUP BY login"); print "

Per-user storage

";