Welcome Guest, Not a member yet? Register   Sign In
Query builder - like() with wildcard within a string
#1

Hi,

I know I can use wildcards on the beginning and end of the string, but I can't figure out how (or if) I can use it withing the string.

I know how $this->db->like() works:
PHP Code:
$this->db->like('title''match');  //produces WHERE `title`LIKE '%match%' 

but sometimes I need to match just one charachter with "_" withing the match string or something more custom
PHP Code:
WHERE `titleLIKE 'ma_ch'
WHERE `titleLIKE 'ma%h%' 

Thanks
Reply


Messages In This Thread
Query builder - like() with wildcard within a string - by p4xel - 08-26-2016, 05:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB