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
This commit is contained in:
kjmtsh 2014-06-16 14:41:07 +00:00
parent 8286b0ac20
commit ccf36c0dd9
1 changed files with 1 additions and 1 deletions

View File

@ -721,7 +721,7 @@ class PDOSQLiteDriver {
private function rewrite_between() { private function rewrite_between() {
if (!$this->rewrite_between) return; 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';
if (preg_match($pattern, $this->_query, $match)) { while (preg_match($pattern, $this->_query, $match)) {
$column_name = trim($match[1]); $column_name = trim($match[1]);
$min_value = trim($match[2]); $min_value = trim($match[2]);
$max_value = trim($match[3]); $max_value = trim($match[3]);