This commit is contained in:
2019-07-04 12:37:56 +02:00
parent 0b444f8f5b
commit 22b37194f3

View File

@@ -37,11 +37,7 @@ class Database
public function addQuestion($question, $answer0, $answer1, $answer2, $solution)
{
$statement = $this->connection->prepare("INSERT INTO questions(question, answer0, answer1, answer2, solution) VALUES(?, ?, ?, ?, ?)");
$statement->bind_param("s", $question);
$statement->bind_param("s", $answer0);
$statement->bind_param("s", $answer1);
$statement->bind_param("s", $answer2);
$statement->bind_param("i", $solution);
$statement->bind_param("ssssi", $question, $answer0, $answer1, $answer2, $solution);
return $statement->execute();
}