From 22b37194f37134e278f2164cf064588547f25eff Mon Sep 17 00:00:00 2001 From: structix Date: Thu, 4 Jul 2019 12:37:56 +0200 Subject: [PATCH] Update --- cgi-bin/uebung09/Database.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cgi-bin/uebung09/Database.php b/cgi-bin/uebung09/Database.php index 17647d2..16478c5 100644 --- a/cgi-bin/uebung09/Database.php +++ b/cgi-bin/uebung09/Database.php @@ -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(); }