summaryrefslogtreecommitdiff
path: root/inc/database.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-09 19:53:27 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-09 19:53:27 +1000
commit4ec50aad801e867a008de92b58d8df98f9d8e2b7 (patch)
tree467f5f28e19cd2ad8d430ec67570095a092bfb7b /inc/database.php
parent548b439fdf12703c9de62ef1c852201f992e758a (diff)
case-insensitive, debug bugfix
Diffstat (limited to 'inc/database.php')
-rw-r--r--inc/database.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/database.php b/inc/database.php
index 2c60015a..861d4c1e 100644
--- a/inc/database.php
+++ b/inc/database.php
@@ -14,7 +14,7 @@ class PreparedQueryDebug {
$query = preg_replace("/[\n\t]+/", ' ', $query);
$this->query = $pdo->prepare($query);
- if ($config['debug'] && $config['debug_explain'] && preg_match('/^(SELECT|INSERT|UPDATE|DELETE) /', $query))
+ if ($config['debug'] && $config['debug_explain'] && preg_match('/^(SELECT|INSERT|UPDATE|DELETE) /i', $query))
$this->explain_query = $pdo->prepare("EXPLAIN $query");
}
public function __call($function, $args) {
@@ -127,7 +127,7 @@ function query($query) {
sql_open();
if ($config['debug']) {
- if ($config['debug_explain'] && preg_match('/^(SELECT|INSERT|UPDATE|DELETE) /', $query)) {
+ if ($config['debug_explain'] && preg_match('/^(SELECT|INSERT|UPDATE|DELETE) /i', $query)) {
$explain = $pdo->query("EXPLAIN $query") or error(db_error());
}
$start = microtime(true);