title: codeigniter best DB query method & Injection prevention
body: <p>I am not sure which is the best method to run a DB query ( or what the difference is for that matter )
  between :</p>
  
  <pre><code>$this-&gt;db
   -&gt;select('*')
   -&gt;from('table');
  $this-&gt;db-&gt;get();
  </code></pre>
  
  <p>and </p>
  
  <pre><code>$this-&gt;db-&gt;query($sql);
  </code></pre>
  
  <p>I found that i need the get() class because i need to have pagination and that is needed for limiters....but maybe the other one allows for pagination too?</p>
  
  <p>the second part about SQL injections is this good enough? if not what is?</p>
  
  <pre><code>  $this-&gt;db
       -&gt;select('*')
       -&gt;from('table');
      $this-&gt;db-&gt;get();
   -&gt;where('id &gt;'.$this-&gt;db-&gt;escape(1));
  </code></pre>
  
  <p>thank you.</p>