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 b45329d1..82818c7e 100644 Binary files a/WEB/Model/scripted.db and b/WEB/Model/scripted.db differ