title: Codeigniter DB Query with where, or, and.. and like
body: <p>I have a query the conditions of it below (minus select, from, etc)</p>
  
  <pre><code>$this-&gt;db-&gt;where('show_year', $yyyy);
  $this-&gt;db-&gt;or_where('idn', $idn);
  $this-&gt;db-&gt;or_like('post_slug', $idn);
  </code></pre>
  
  <p>which forms </p>
  
  <pre><code>SELECT * FROM (`nyb_articles`) 
  WHERE `show_year` = '2009' 
  OR `idn` = 'the' 
  AND `post_slug` LIKE '%the%'
  </code></pre>
  
  <p>However I am looking to have it be more like</p>
  
  <pre><code>SELECT * FROM (`nyb_articles`) 
  WHERE `show_year` = '2009' 
  AND (`idn` = 'the' OR `post_slug` LIKE '%the%')
  </code></pre>
  
  <p>My problem is Im not sure if CI's active record supports this notion, and if it does, how would I tackle it, as I can't find notion of it anywhere in the docs. No matter how I change up the <code>like</code>, <code>or_like</code>, <code>where</code>, <code>or_where</code> I can't even nail something similar. So anyone got any ideas? I'd prefer to stay away from a raw query if at all possible, but if I have to prepare one and do it that way, I will, just prefer not to.</p>