title: Codeigniter - Active Record How To Where(codition OR condition )
body: <pre><code>$this-&gt;db-&gt;select('*');
  $this-&gt;db-&gt;from('user');
  $this-&gt;db-&gt;where("Password",$password);
  $this-&gt;db-&gt;where("Status",true);
  $this-&gt;db-&gt;where("(Username = '$username' OR Email = '$email')");
  $query=$this-&gt;db-&gt;get();
  </code></pre>
  
  <p>The query is successful for email condition but fails for username, can someone help me understand why this does not function the way it is expected.</p>
  
  <p>Functionality : The query should return record when password=password and status=true and (username=username or email=email).</p>
  
  <p>This is a login form where user can specify username and password or email and password and ay of these match the query should return the result.</p>
  
  <p>Also on the other note the query does not match the password exactly i mean it is not case sensitive, i want the password comparison to be case sensitive so we can get a exact match.</p>
  
  <p>Please help! Thanks i advbance</p>