diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-20 13:35:06 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-20 13:35:06 +0100 |
commit | f1bda680e08453e4c73177b9920b22fe362819eb (patch) | |
tree | 8644550297e423d7a9fe8a00d72ab56be379e8f2 /system | |
parent | 5f356bfa899ac953e987b4de67c954a779e8d3c9 (diff) |
Alter str_replace() order in ODBC's escape_str()
Diffstat (limited to 'system')
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index b70713ce9..5e3fd7aef 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -249,9 +249,9 @@ class CI_DB_odbc_driver extends CI_DB { // escape LIKE condition wildcards if ($like === TRUE) { - $str = 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); + return str_replace(array($this->_like_escape_chr.$this->_like_escape_chr, '%', '_'), + array($this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'%', $this->_like_escape_chr.'_'), + $str); } return $str; |