diff options
author | James L Parry <jim_parry@bcit.ca> | 2014-12-03 10:39:09 +0100 |
---|---|---|
committer | James L Parry <jim_parry@bcit.ca> | 2014-12-03 10:39:09 +0100 |
commit | 7eb492b77a30498c9d563032866fd0aaf494e44c (patch) | |
tree | 477b8b8549816905715e096b14f3a50da4cf161e /system/database/DB_driver.php | |
parent | d2485a3c8f62a6963cf5c49195e490ac67135b5d (diff) | |
parent | df5299fd41c03ce2ad2e302e265aace36751bd31 (diff) |
Merge branch 'develop' of github.com:bcit-ci/CodeIgniter into userguide/database_utilities
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 0b4707370..7c3df42b8 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1461,7 +1461,7 @@ abstract class CI_DB_driver { */ protected function _has_operator($str) { - return (bool) preg_match('/(<|>|!|=|\sIS\s|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str)); + return (bool) preg_match('/(<|>|!|=|\sIS NULL|\sIS NOT NULL|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str)); } // -------------------------------------------------------------------- @@ -1485,7 +1485,8 @@ abstract class CI_DB_driver { '\s*(?:<|>|!)?=\s*', // =, <=, >=, != '\s*<>?\s*', // <, <> '\s*>\s*', // > - '\s+IS(?:\sNOT)?(?:\sNULL)?', // IS[ NOT] NULL + '\s+IS NULL', // IS NULL + '\s+IS NOT NULL', // IS NOT NULL '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) '\s+BETWEEN\s+\S+\s+AND\s+\S+', // BETWEEN value AND value |