title: Codeigniter: does $this->db->last_query(); execute a query?
body: <p>Does query execution happen at the <code>get_where()</code> clause of the following codeigniter active record statement?</p>
  
  <pre><code>$this-&gt;db-&gt;select('*');
      $q = $this-&gt;db-&gt;get_where('Contacts', array('id' =&gt; $contact_id));
  
      $sql = $this-&gt;db-&gt;last_query();
  </code></pre>
  
  <p>Or does it happens once you call the <code>result_array()</code>?</p>
  
  <p>And is <code>$this-&gt;db-&gt;last_query();</code> a reliable way in getting the query string.</p>