diff --git a/stats.php b/stats.php index 82d0618..5e7af19 100755 --- a/stats.php +++ b/stats.php @@ -1,6 +1,20 @@ query('SELECT SUM(points) AS s FROM scores WHERE team = 0'); +$r0 = $req_p0->fetchAll(PDO::FETCH_ASSOC); + +if(!($r0[0]['s'] > 0)) { + $r0[0]['s'] = 0; +} + +$req_p1 = $db->query('SELECT SUM(points) AS s FROM scores WHERE team = 1'); +$r1 = $req_p1->fetchAll(PDO::FETCH_ASSOC); + +if(!($r1[0]['s'] > 0)) { + $r1[0]['s'] = 0; +} ?>
@@ -23,8 +37,8 @@ include "script/db.php"; - - + +
PKpeach
Boomario
PKpeach - points
Boomario - points