From 646fc2c0aa8a4b8cc251f641134cccc6d999cfdb Mon Sep 17 00:00:00 2001 From: johan Date: Tue, 6 Dec 2022 12:48:55 +0100 Subject: [PATCH] Correction de la classe Connection --- WEB/Config/Connection.php | 8 ++++---- WEB/Controller/EnigmeGateway.php | 4 ++-- WEB/Model/scripted.db | Bin 53248 -> 53248 bytes 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WEB/Config/Connection.php b/WEB/Config/Connection.php index c60e0b9f..6d049bdd 100644 --- a/WEB/Config/Connection.php +++ b/WEB/Config/Connection.php @@ -45,11 +45,11 @@ class Connection extends SQLite3 public function getResults(): array { - $resultArray = array(); + $resultArray = $this->result->fetchArray(SQLITE3_ASSOC); $multiArray = array(); - while($resultArray != false){ - $resultArray = $this->result->fetchArray(SQLITE3_ASSOC); //read next row - array_push($multiArray, $resultArray); //insert all rows to $multiArray + while($resultArray != false){ //read next row + array_push($multiArray, $resultArray); + $resultArray = $this->result->fetchArray(SQLITE3_ASSOC); //insert all rows to $multiArray } if ($multiArray == NULL) return array(); diff --git a/WEB/Controller/EnigmeGateway.php b/WEB/Controller/EnigmeGateway.php index e748c0b1..7b168d29 100644 --- a/WEB/Controller/EnigmeGateway.php +++ b/WEB/Controller/EnigmeGateway.php @@ -82,7 +82,7 @@ class EnigmeGateway * It returns an array of Enigma objects * For Solo enigma * - * @return An array of objects. + * @return array of objects. */ public function findSoloEnigma(){ $query = "SELECT * FROM Enigme @@ -120,7 +120,7 @@ class EnigmeGateway $results = $this->con->getResults(); $tabEnigme=EnigmeFactory::create($results); return $tabEnigme; - }*/ + } public function showAll(): void { diff --git a/WEB/Model/scripted.db b/WEB/Model/scripted.db index b45329d1b78f2823ca2ad794c1b3b2b8da7533d6..82818c7e63122b0260f3f50ae2be2bbfdc184aa6 100644 GIT binary patch delta 173 zcmZozz}&Ead4e>f_(U0JM)8daOZfTO_!t=Ym+=SlGx4qC3*+0YDDajyEQF0sQ?!wl zBP%~6G0!14F*B!BFRdsqF|Sg^s8YqyK*iL%*eAC<+0rr7BiJmfFweEZJhe*CKd92r zF~q1M-Lx#<%)mLdvLvL;)TOF4r7%2O-_?I}nA|!>E;jzj4E%5SZ}Csw%%jlCFD%5Y O$%twX+va8ZQ40Vmvo%Km delta 66 zcmV-I0KNZ!paX!Q1CSd57Lgo70T!`fqz?`S4psmUrVmpO0uHVYRL=Ll79