diff options
author | Emrul Easir <emrulmax2@gmail.com> | 2019-03-28 22:29:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 22:29:17 +0100 |
commit | d8c7f8d190b9215959b68a5272c76e9b79371999 (patch) | |
tree | c68f55e04ed19005e182d9b9ab564da7297025c3 /system/database/DB_driver.php | |
parent | 7480b4c89fadd542bd9f410c0d7657a67f169c1a (diff) |
NOT BETWEEN syntax error DB where() issue solved
While creating a SQL query string using query builder, NOT BETWEEN operator adds a syntax error, Solution added to _has_operator() and _get_operator() method.
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index b4f16b905..e901f2948 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1476,7 +1476,7 @@ abstract class CI_DB_driver { */ protected function _has_operator($str) { - return (bool) preg_match('/(<|>|!|=|\sIS NULL|\sIS NOT NULL|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str)); + return (bool) preg_match('/(<|>|!|=|\sIS NULL|\sIS NOT NULL|\sEXISTS|\sBETWEEN|\s NOT BETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str)); } // -------------------------------------------------------------------- @@ -1505,6 +1505,7 @@ abstract class CI_DB_driver { '\s+EXISTS\s*\(.*\)', // EXISTS(sql) '\s+NOT EXISTS\s*\(.*\)', // NOT EXISTS(sql) '\s+BETWEEN\s+', // BETWEEN value AND value + '\s+NOT BETWEEN\s+', // NOT BETWEEN value AND value '\s+IN\s*\(.*\)', // IN(list) '\s+NOT IN\s*\(.*\)', // NOT IN (list) '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] |