]> git.wh0rd.org Git - tt-rss.git/commitdiff
statistics stub (2)
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Feb 2006 10:48:47 +0000 (11:48 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Feb 2006 10:48:47 +0000 (11:48 +0100)
stats.php

index 65723ff2eede9b843febe38ee97b64a67884bac7..d56389ecab6a02cb374ef3eff752b0a3c0c77448 100644 (file)
--- a/stats.php
+++ b/stats.php
 <h2>Counters</h2>
 
 <?
-       $result = db_query($link, "SELECT count(int_id) as cid FROM ttrss_user_entries");
+       $result = db_query($link, "SELECT count(id) AS cid,
+               SUM(LENGTH(content)) AS size
+               FROM ttrss_entries");
 
        $total_articles = db_fetch_result($result, 0, "cid");
+       $articles_size = round(db_fetch_result($result, 0, "size") / 1024);
 
-       print "<p>Total articles stored: $total_articles</p>";
+       print "<p>Total articles stored: $total_articles (${articles_size}K)</p>";
 
        $result = db_query($link, "SELECT COUNT(int_id) as cid,owner_uid,login 
                FROM ttrss_user_entries