summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-04-02 13:16:41 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-04-02 13:16:41 +0200
commit36b0c949fdb16163e4b57b1db0cbc777941eff6f (patch)
treec9a3d2d78b0d997f552d27c017c19b845bb809b3 /system/database
parent2e1f1804d55f534d654f7b8ae1e9db26c19d2501 (diff)
Fixed issue #153 Escape Str Bug in MSSQL driver
Diffstat (limited to 'system/database')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index b581a478c..65397ed8f 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -267,9 +267,11 @@ 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;