summaryrefslogtreecommitdiff
path: root/stats.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-02-12 11:48:47 +0100
committerAndrew Dolgov <[email protected]>2006-02-12 11:48:47 +0100
commit3e4950c7bb00a0ed819a81f20ca3cb3a004fdccc (patch)
tree12451aedf93a6393beb73e5a4f7552fc9177c2bf /stats.php
parent81f8401db744830ca78f6aa7a54e11de79bcf1e9 (diff)
statistics stub (2)
Diffstat (limited to 'stats.php')
-rw-r--r--stats.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/stats.php b/stats.php
index 65723ff2e..d56389eca 100644
--- a/stats.php
+++ b/stats.php
@@ -29,11 +29,14 @@
<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