From 8ea59b4944809250896fef5862ac0b1d07bf9322 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Mon, 20 Jun 2022 21:20:11 +0200 Subject: [PATCH] totaux stats --- stats.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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