I have a request for conditions below (minus select, from, etc.)
$this->db->where('show_year', $yyyy); $this->db->or_where('idn', $idn); $this->db->or_like('post_slug', $idn);
which forms
SELECT * FROM (`nyb_articles`) WHERE `show_year` = '2009' OR `idn` = 'the' AND `post_slug` LIKE '%the%'
However, I am looking for it to be more like
SELECT * FROM (`nyb_articles`) WHERE `show_year` = '2009' AND (`idn` = 'the' OR `post_slug` LIKE '%the%')
My problem is that I'm not sure if an active CI record supports this concept, and if so, how would I deal with it since I cannot find it anywhere in the document. No matter how I change like , or_like , where , or_where , I can't even nail something like that. So who has any ideas? I would prefer to stay away from the raw request, if at all possible, but if I need to prepare it and do so, I just don't want to do this.
chris source share