mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-24 06:43:01 +00:00
Only log sql qierues in development mode
This commit is contained in:
parent
38fb6b8eb6
commit
6ec021de36
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,9 @@ class Database
|
|||
}
|
||||
|
||||
public function query($sql, $variables = []) {
|
||||
if($this->settings->get("env.mode") == "development")
|
||||
error_log("[Database/SQL] $sql");
|
||||
|
||||
// FUTURE: Optionally cache prepared statements?
|
||||
$statement = $this->connection->prepare($sql);
|
||||
$statement->execute($variables);
|
||||
|
|
Loading…
Reference in a new issue