diff --git a/app/Blessing/Foundation/Database.php b/app/Blessing/Foundation/Database.php index 937c134a..1c978c0d 100644 --- a/app/Blessing/Foundation/Database.php +++ b/app/Blessing/Foundation/Database.php @@ -70,9 +70,13 @@ class Database public function query($sql) { + // compile patterns + $sql = str_replace('{table}', $this->table_name, $sql); + $result = $this->connection->query($sql); if ($this->connection->error) throw new E("Database query error: ".$this->connection->error.", Statement: ".$sql, -1); + return $result; }