diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-08-21 06:42:52 +0200 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-08-21 06:42:52 +0200 |
commit | a0672e1e1f8c5d633a4f0e985e3bcc876862933b (patch) | |
tree | 6f68dc832a93e3356229269b5d2747bc3cc4bc88 /system/database/DB_active_rec.php | |
parent | 020f754c59df5aea5c2834b23e92527774d8e917 (diff) | |
parent | ea4ad9b4e7ab7824da4274e30075fd36a6bf9952 (diff) |
Merge pull request #223 from chonthu/patch-1
Added ability for db like param $side to use 'none'
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r-- | system/database/DB_active_rec.php | 8 |
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}'"; } |