From 64f96e3a96878bbddfc01960cbde12957f243d6e Mon Sep 17 00:00:00 2001 From: davidhart Date: Tue, 8 Mar 2011 12:00:21 +0000 Subject: Fixed bug in escaping underscores etc in MSSQL LIKE conditions. --- system/database/drivers/mssql/mssql_driver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/database/drivers/mssql/mssql_driver.php') diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 5048c0b4a..b581a478c 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -267,9 +267,9 @@ class CI_DB_mssql_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); + $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; -- cgit v1.2.3-24-g4f1b