From c44265eb102f37af949997f8bb3d7be139ce8710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Thu, 12 Jan 2023 16:31:11 +0100 Subject: [PATCH] Correction de bu getRandomEnigme --- WEB/Controller/EnigmeGateway.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WEB/Controller/EnigmeGateway.php b/WEB/Controller/EnigmeGateway.php index a1d9742b..d071859f 100644 --- a/WEB/Controller/EnigmeGateway.php +++ b/WEB/Controller/EnigmeGateway.php @@ -182,8 +182,9 @@ class EnigmeGateway public function getRandomEnigme() : Enigme { $query = "SELECT * FROM Enigme - WHERE points IS NOT NULL OR points != 0 - AND tempsDeResolution IS NOT NULL OR tempsDeResolution != 0 + WHERE points != 0 + AND tempsDeResolution != 0 + AND ordre = 0 ORDER BY RANDOM() LIMIT 1"; $this->con->executequery($query); $results = $this->con->getResults();