Only log sql qierues in development mode

pull/26/head
Starbeamrainbowlabs 4 years ago
parent 38fb6b8eb6
commit 6ec021de36
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 4
      logic/Database.php

@ -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…
Cancel
Save