title: codeigniter multiple OR query
body: <p>I want to use following query in Codeigniter:</p>
  
  <pre><code>SELECT `users` . * , `users_profile` . * FROM (`users`) LEFT JOIN `users_profile`
  ON `users`.`id` = `users_profile`.`users_id`
  WHERE (`loginid` = '$username' OR `email` = '$username' )
  AND `password` = '$password' AND `users`.`status` = 'A' LIMIT 1 
  </code></pre>
  
  <p>It is working fine, but when I write this query in Codeigniter format:</p>
  
  <pre><code>$this-&gt;db-&gt;where('loginid',"$username");
  $this-&gt;db-&gt;or_where('email', "$username");    
  $this-&gt;db-&gt;where('password',MD5($password));
  $this-&gt;db-&gt;where('users.status','A');
  $this-&gt;db-&gt;limit(1);
  </code></pre>
  
  <p>It will return always true what is right syntax?</p>