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