title: How to give two or where condition in mysql query in codeigniter
body: <p>i need to run a query something similar to this</p>
  
  <pre><code>select * from users where (username='abc' or email='abc@gmail.com') and password='123'
  </code></pre>
  
  <p>How to do that in codeigniter? I tried something like,</p>
  
  <pre><code>$this-&gt;db-&gt;select('*');
      $this-&gt;db-&gt;from('users');
      $this-&gt;db-&gt;where("email = '" . $email . "'");
      $this-&gt;db-&gt;or_where("username = '" . $email . "'");
      $this-&gt;db-&gt;where("password = '" . $password . "'");
      $query = $this-&gt;db-&gt;get();
  </code></pre>
  
  <p>Here user may insert value for username as email or username. So need to check username field value both in email field and username field with password</p>