added LIKE condition escaping to all drivers and Active Record
updated all DB drivers to accept arrays in escape_str()
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index c757e6a..d48f43e 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -707,7 +707,7 @@
$prefix = (count($this->ar_like) == 0) ? '' : $type;
- $v = $this->escape_str($v);
+ $v = $this->escape_like_str($v);
if ($side == 'before')
{
@@ -722,6 +722,12 @@
$like_statement = $prefix." $k $not LIKE '%{$v}%'";
}
+ // some platforms require an escape sequence definition for LIKE wildcards
+ if ($this->_like_escape_str != '')
+ {
+ $like_statement = $like_statement.sprintf($this->_like_escape_str, $this->_like_escape_char);
+ }
+
$this->ar_like[] = $like_statement;
if ($this->ar_caching === TRUE)
{