]> git.wh0rd.org Git - tt-rss.git/commitdiff
update stats
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 2 Mar 2006 16:21:18 +0000 (17:21 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 2 Mar 2006 16:21:18 +0000 (17:21 +0100)
stats.php

index 007053b18567142750757bc4c53b9b8ff09b001a..730bea252eced4824ecc3d6a23c19d79e120a9aa 100644 (file)
--- a/stats.php
+++ b/stats.php
 
        print "<p>Total articles stored: $total_articles (${articles_size}K)</p>";
 
-       $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 "<h2>Per-user storage</h2>";