From 4e2f8fb716904ac4bdb71b8c829914fbb7b3ecb1 Mon Sep 17 00:00:00 2001 From: Thomas Lake Date: Thu, 25 Apr 2019 19:52:48 +0100 Subject: [PATCH] Correctly extract old user page count from DB --- components/printer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/printer.php b/components/printer.php index 8247a88..a3561ad 100644 --- a/components/printer.php +++ b/components/printer.php @@ -98,7 +98,7 @@ $res->Close(); //get the number of pages printed by "old" users and add it to the total $res = $sucsDB->Execute("select sum(pages) as pages from printer where username = 'old' group by username order by sum(pages) desc"); $old = $res->FetchRow(); -$old = $old[0]; +$old = $old['pages']; $res->Close(); $total += $old; //Output two lines at the bottem of the table, one for "old" users and the other for the total -- GitLab