This commit is contained in:
2019-07-04 13:09:40 +02:00
parent 96cac8e725
commit 5fba0fa53a
2 changed files with 64 additions and 0 deletions

View File

@@ -69,5 +69,20 @@ class Database
return $resultArray;
}
public function getQuestion($id)
{
$result = $this->connection->query("SELECT * FROM questions WHERE id = $id LIMIT 1");
$resultArray = [];
while ($line = $result->fetch_assoc()) {
array_push($resultArray, $line);
}
$result->free();
return $resultArray[0];
}
}