diff options
Removed backticks from DB model
1 files changed, 2 insertions, 2 deletions
| -rw-r--r-- | src/models/DB.php | 4 |
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); |
