Summary Files Commits Branches @commit @diff @stats
path: root / src / models / DB.php
diff options
context:
space:
mode:
Commit9b086f2c849aa765c3e5a72a7063343e7237f030 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-04-03 16:06:33 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-04-03 16:06:33 +0300
Filesf696f19bb5f5cda8476d9c1f47d4fd72e1f5c7f1 /src/models/DB.php
devrix-job-board-9b086f2c849aa765c3e5a72a7063343e7237f030.tar
devrix-job-board-9b086f2c849aa765c3e5a72a7063343e7237f030.tar.gz
devrix-job-board-9b086f2c849aa765c3e5a72a7063343e7237f030.zip
Parent42a0e2f72fed0a947242b004a0fc6eb4a664174b (diff)
Removed backticks from DB model
1 files changed, 2 insertions, 2 deletions
-rw-r--r--src/models/DB.php4
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);