issue: header counting open and closed rows
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 5 Oct 2021 22:41:23 +0000 (00:41 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 5 Nov 2021 18:01:05 +0000 (19:01 +0100)
issue/index.php

index 35a1116b153b72cd26de0973b8e64842ecc5dad3..547547a5cd984a15d69e3a7439d2339a529e2eec 100644 (file)
@@ -83,6 +83,12 @@ if ($id == 'feed') {
 }
 
 ob_start();
+$stats = $Db->query(
+       "SELECT count(*) AS total, count(closed) AS closed FROM issues"
+)->fetch();
+printf("<h4>%d lopende zaken, %s opgelost</h4>\n",
+       $stats->total - $stats->closed, $stats->closed
+);
 print '<ul>';
 while ($row = $query->fetch()) {
        printf('<li%s><div><a href="%s">',