From 491c26e80ce7f42b1d4c337c8136f4edd07eb6f0 Mon Sep 17 00:00:00 2001 From: tracer Date: Thu, 27 Jan 2022 15:13:51 +0100 Subject: [PATCH] fixed sql error Signed-off-by: tracer --- src/Controller/ApiKeys.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/ApiKeys.php b/src/Controller/ApiKeys.php index e1484ce..c22b1fa 100644 --- a/src/Controller/ApiKeys.php +++ b/src/Controller/ApiKeys.php @@ -26,7 +26,8 @@ class ApiKeys FROM " . DatabaseConnection::TABLE_USER; try { - $statement = $this->databaseConnection->getConnection()->query(statement: $sql); + $statement = $this->databaseConnection->getConnection()->prepare(query: $sql); + $statement->execute(); return $statement->fetchAll(mode: PDO::FETCH_ASSOC); } catch (PDOException $e) { exit($e->getMessage());