mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-25 10:55: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 = []) {
|
||||
error_log("[Database/SQL] $sql");
|
||||
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