From 9fd9fd7bbdb99755c97033bd6fdedbdaf816a40c Mon Sep 17 00:00:00 2001 From: kjmtsh Date: Mon, 16 Jun 2014 18:56:00 +0000 Subject: [PATCH] Another fix for manipulating BETWEEN statement git-svn-id: https://plugins.svn.wordpress.org/sqlite-integration/trunk@933223 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- query.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query.class.php b/query.class.php index f7afafb..c2d9567 100644 --- a/query.class.php +++ b/query.class.php @@ -720,7 +720,7 @@ class PDOSQLiteDriver { */ private function rewrite_between() { if (!$this->rewrite_between) return; - $pattern = '/\\s*(CAST\(.+?\)|[^\\s\(]*)?\\s*BETWEEN\\s*([^\\s]*)?\\s*AND\\s*([^\\s\)]*)?\\s*/ims'; + $pattern = '/\\s*(CAST\([^\)]+?\)|[^\\s\(]*)?\\s*BETWEEN\\s*([^\\s]*)?\\s*AND\\s*([^\\s\)]*)?\\s*/ims'; while (preg_match($pattern, $this->_query, $match)) { $column_name = trim($match[1]); $min_value = trim($match[2]);