statistics stub (2)

This commit is contained in:
Andrew Dolgov 2006-02-12 11:48:47 +01:00
parent 81f8401db7
commit 3e4950c7bb
1 changed files with 5 additions and 2 deletions

View File

@ -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