title: Codeigniter WHERE AND OR together
body: <p>I am trying to combine Where And OR in Codeigniter via code.   </p>
  
  <pre><code>$this-&gt;db-&gt;where("id",1);
  $this-&gt;db-&gt;where("status","live")-&gt;or_where("status","dead");
  </code></pre>
  
  <p>Appeared result is as query<br>
   <code>where id=1 and status='live' OR status='dead'</code><br>
  Whereas i need result for this query.<br>
   <code>where id=1 and (status='live' OR status='dead');</code></p>
  
  <p>NOTE: Please don't give solution of string passed as parameter from where function. That's not fit into my code. I Just simplified my problem above.</p>