title: codeigniter query db using select statement
body: <p>I am new to CodeIgniter, please help me to write a select statement in CodeIgniter equivalent of </p>
  
  <pre><code>$username='JOHN';
  $query=SELECT id FROM table1 WHERE username=$username
  </code></pre>
  
  <p>Just the format, the rest I'll figure out. Thanks.</p>