Fixed query syntax

This commit is contained in:
Joshua Perry 2023-01-25 16:32:54 +00:00
parent f9081f5788
commit 3b9791888c
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class DatabaseTable {
'value' => $value, 'value' => $value,
'value2' => $value2 'value2' => $value2
]; ];
$stmt = $this->startDB()->prepare('SELECT * FROM '. $this->table . ' WHERE '. $column . ' = :value AND'. $column2 .' = :value2'); $stmt = $this->startDB()->prepare('SELECT * FROM '. $this->table . ' WHERE '. $column . ' = :value AND '. $column2 .' = :value2');
$stmt->setFetchMode(\PDO::FETCH_CLASS, $this->entityClass, $this->entityConstructor); $stmt->setFetchMode(\PDO::FETCH_CLASS, $this->entityClass, $this->entityConstructor);
$stmt->execute($values); $stmt->execute($values);
return $stmt->fetchAll(); return $stmt->fetchAll();