From 9b086f2c849aa765c3e5a72a7063343e7237f030 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 3 Apr 2021 16:06:33 +0300 Subject: Removed backticks from DB model --- src/models/DB.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/models/DB.php') diff --git a/src/models/DB.php b/src/models/DB.php index 0f06573..db93d32 100644 --- a/src/models/DB.php +++ b/src/models/DB.php @@ -117,7 +117,7 @@ class DB { * Returns the next value that has the given id. */ function getById(string $tableName, int $id) { - $sth = $this->connection->prepare("SELECT * FROM `{$tableName}` WHERE id = {$id}"); + $sth = $this->connection->prepare("SELECT * FROM {$tableName} WHERE id = {$id}"); $sth->execute(); return $sth->fetch(PDO::FETCH_OBJ); @@ -127,7 +127,7 @@ class DB { * Returns all values inside a table. */ function getAllValues(string $tableName) { - $sth = $this->connection->prepare("SELECT * FROM `{$tableName}`"); + $sth = $this->connection->prepare("SELECT * FROM {$tableName}"); $sth->execute(); return $sth->fetchAll(PDO::FETCH_OBJ); -- cgit v1.3.1-23-gd82d