Correction de la classe Connection
continuous-integration/drone/push Build is passing Details

ServeurDeTest
johan 2 years ago
parent 3e9810c36a
commit 646fc2c0aa

@ -45,11 +45,11 @@ class Connection extends SQLite3
public function getResults(): array public function getResults(): array
{ {
$resultArray = array(); $resultArray = $this->result->fetchArray(SQLITE3_ASSOC);
$multiArray = array(); $multiArray = array();
while($resultArray != false){ while($resultArray != false){ //read next row
$resultArray = $this->result->fetchArray(SQLITE3_ASSOC); //read next row array_push($multiArray, $resultArray);
array_push($multiArray, $resultArray); //insert all rows to $multiArray $resultArray = $this->result->fetchArray(SQLITE3_ASSOC); //insert all rows to $multiArray
} }
if ($multiArray == NULL) if ($multiArray == NULL)
return array(); return array();

@ -82,7 +82,7 @@ class EnigmeGateway
* It returns an array of Enigma objects * It returns an array of Enigma objects
* For Solo enigma * For Solo enigma
* *
* @return An array of objects. * @return array of objects.
*/ */
public function findSoloEnigma(){ public function findSoloEnigma(){
$query = "SELECT * FROM Enigme $query = "SELECT * FROM Enigme
@ -120,7 +120,7 @@ class EnigmeGateway
$results = $this->con->getResults(); $results = $this->con->getResults();
$tabEnigme=EnigmeFactory::create($results); $tabEnigme=EnigmeFactory::create($results);
return $tabEnigme; return $tabEnigme;
}*/ }
public function showAll(): void public function showAll(): void
{ {

Binary file not shown.
Loading…
Cancel
Save