summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql/mssql_driver.php
diff options
context:
space:
mode:
authordavidhart <david.hart@gmail.com>2011-03-08 13:00:21 +0100
committerdavidhart <david.hart@gmail.com>2011-03-08 13:00:21 +0100
commit64f96e3a96878bbddfc01960cbde12957f243d6e (patch)
tree5b67900c943b719cc2b0ed221de1eeb8fa47dc07 /system/database/drivers/mssql/mssql_driver.php
parent9b77fe3e39894af4816a662630c442ab89f16e31 (diff)
Fixed bug in escaping underscores etc in MSSQL LIKE conditions.
Diffstat (limited to 'system/database/drivers/mssql/mssql_driver.php')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php6
1 files changed, 3 insertions, 3 deletions
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;