Another fix for manipulating BETWEEN statement
git-svn-id: https://plugins.svn.wordpress.org/sqlite-integration/trunk@933223 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
ccf36c0dd9
commit
9fd9fd7bbd
|
@ -720,7 +720,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';
|
||||||
while (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]);
|
||||||
|
|
Loading…
Reference in New Issue