Only log sql qierues in development mode
This commit is contained in:
parent
38fb6b8eb6
commit
6ec021de36
|
@ -42,7 +42,9 @@ class Database
|
||||||
}
|
}
|
||||||
|
|
||||||
public function query($sql, $variables = []) {
|
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?
|
// FUTURE: Optionally cache prepared statements?
|
||||||
$statement = $this->connection->prepare($sql);
|
$statement = $this->connection->prepare($sql);
|
||||||
$statement->execute($variables);
|
$statement->execute($variables);
|
||||||
|
|
Loading…
Reference in New Issue