From f6859effd2781cda93ee0e5ea51ea30af58a3843 Mon Sep 17 00:00:00 2001 From: kjmtsh Date: Thu, 17 Apr 2014 07:34:54 +0000 Subject: [PATCH] fixed the bug for BETWEEN statement git-svn-id: https://plugins.svn.wordpress.org/sqlite-integration/trunk@895814 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- query.class.php | 2 +- readme-ja.txt | 2 +- readme.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/query.class.php b/query.class.php index 1312ca9..2ff310c 100644 --- a/query.class.php +++ b/query.class.php @@ -718,7 +718,7 @@ class PDOSQLiteDriver { */ private function rewrite_between() { if (!$this->rewrite_between) return; - $pattern = '/\\s*(\\w+)?\\s*BETWEEN\\s*([^\\s]*)?\\s*AND\\s*([^\\s]*)?\\s*/ims'; + $pattern = '/\\s*([^\\s\(]*)?\\s*BETWEEN\\s*([^\\s]*)?\\s*AND\\s*([^\\s\)]*)?\\s*/ims'; if (preg_match($pattern, $this->_query, $match)) { $column_name = trim($match[1]); $min_value = trim($match[2]); diff --git a/readme-ja.txt b/readme-ja.txt index de36dea..6609d0a 100644 --- a/readme-ja.txt +++ b/readme-ja.txt @@ -161,7 +161,7 @@ query_posts() や WP_Query() を使うときに、オプションの一部が機 == Changelog == -= 1.6 (2014-04-27) = += 1.6 (2014-04-17) = * 未対応のクエリに対するエラーメッセージのコントロールができていないのを修正しました。 * SQL_CALC_FOUND_ROW ステートメントのバグを修正しました。メインクエリと WP_Query、WP_Meta_Query などのページング情報に関連したものです。 * コメント本文からバッククォートが削除されるバグを修正しました。 diff --git a/readme.txt b/readme.txt index 03cd2fe..9c55059 100644 --- a/readme.txt +++ b/readme.txt @@ -159,7 +159,7 @@ When query_posts() or WP_Query() is used, some options didn't work properly. Whe == Changelog == -= 1.6 (2014-04-10) = += 1.6 (2014-04-17) = * Fixed the bug of error messaging control for the unknown query. * Fixed the bug for 'SQL_CALC_FOUND_ROW' statement. This is for the main query, WP_Query class and WP_Meta_Query concerning paging information. * Fixed the bug that the back quote in the comments was removed.