title: CodeIgniter Active Record or_where() function produces AND in sql?
body: <p>I wrote an active record query in CodeIgniter and then I realised that I needed to use OR with to WHERE clauses. So I looked through the docs and found or_where which did what I wanted. But when I use it it produces AND in the output. I couldn't find any other questions on this issue.</p>
  
  <p>I'm using CodeIgniter: 2.1.0</p>
  
  <p>Here is my code (slightly cut down):</p>
  
  <p>$this->db->select("p.*",false);</p>
  
  <pre><code>$this-&gt;db-&gt;from('projects p');
  $this-&gt;db-&gt;join('customers c', 'p.c_id = c.c_id','left outer');
  
  if(isset($options['add_root']))
    $this-&gt;db-&gt;or_where('p.p_id=',1,FALSE);
  
  //Get top level projects by default (1) or whatever parent is specified.
  if(isset($options['p_id']))
    $this-&gt;db-&gt;where('p.p_id=',$options['p_id'],false);
  
  $query = $this-&gt;db-&gt;get();//query
  </code></pre>