title: CodeIgniter Select Query
body: <p>I have a simple CodeIgniter Active record query to select an ID:</p>
  
  <pre><code>$q = $this -&gt; db
             -&gt; select('id')
             -&gt; where('email', $email)
             -&gt; limit(1)
             -&gt; get('users');
  </code></pre>
  
  <p>How can I assign the above ID to a variable (eg. $id) 
  For example, </p>
  
  <pre><code>echo "ID is" . $id;
  </code></pre>
  
  <p>Thanks.</p>