Only log sql qierues in development mode

This commit is contained in:
Starbeamrainbowlabs 2019-02-24 17:18:36 +00:00
parent 38fb6b8eb6
commit 6ec021de36
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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);