From ccf36c0dd91329cce8687cf2a788f7a83f0b150e Mon Sep 17 00:00:00 2001 From: kjmtsh Date: Mon, 16 Jun 2014 14:41:07 +0000 Subject: [PATCH] fixed the procedure for manipulating multiple between statement git-svn-id: https://plugins.svn.wordpress.org/sqlite-integration/trunk@933053 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 45e58f4..f7afafb 100644 --- a/query.class.php +++ b/query.class.php @@ -721,7 +721,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'; - if (preg_match($pattern, $this->_query, $match)) { + while (preg_match($pattern, $this->_query, $match)) { $column_name = trim($match[1]); $min_value = trim($match[2]); $max_value = trim($match[3]);