diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-09 13:25:00 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-09 13:25:00 +0100 |
commit | 5e18e891a14400a96f9b4af36925457b79b62005 (patch) | |
tree | bab3b84ddd428a3b709a076082677f8460a246a9 /system/database/drivers/odbc | |
parent | 9771548893f4580f9fe6be91fae00487782bd9be (diff) |
Fix an eventual issue with LIKE escaping
Diffstat (limited to 'system/database/drivers/odbc')
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 01515221b..47d3a340b 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -232,14 +232,13 @@ class CI_DB_odbc_driver extends CI_DB { return $str; } - // ODBC doesn't require escaping $str = remove_invisible_characters($str); // escape LIKE condition wildcards if ($like === TRUE) { - return str_replace(array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), + return str_replace(array($this->_like_escape_chr, '%', '_'), + array($this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'%', $this->_like_escape_chr.'_'), $str); } |