summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorNithin <admin@nitmedia.com>2011-08-21 06:23:47 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-05-23 18:22:20 +0200
commit74b648c2da3ee5d92920cea2355ccf36d5e0519e (patch)
tree2995797166d4aa13605f733885d22ffbb05e9160 /system
parenta3ce0ec96f98e1bcd1c5a0bc088d13f3178c01c6 (diff)
Added ability to _like paramater side to use 'none', in case one wants to query like instead of where without case being sensitive
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_active_rec.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 7bab729f5..841ede28e 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -660,8 +660,12 @@ class CI_DB_active_record extends CI_DB_driver {
$prefix = (count($this->ar_like) == 0) ? '' : $type;
$v = $this->escape_like_str($v);
-
- if ($side == 'before')
+
+ if ($side == 'none')
+ {
+ $like_statement = $prefix." $k $not LIKE '{$v}'";
+ }
+ elseif ($side == 'before')
{
$like_statement = $prefix." $k $not LIKE '%{$v}'";
}