From f26ef034b52faf09001db56d5be616dcea07c4db Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 2 Mar 2006 17:21:18 +0100 Subject: [PATCH] update stats --- stats.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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

";