title: CodeIgniter pagination with this->db->query
body: <p>How to use the codeigniter with $this->db->query() method?</p>
  
  <p>If i use active record class i would do like this:</p>
  
  <pre><code>$query = $this-&gt;db-&gt;get('tb_cash_transaction',$num,$offset);
  $this-&gt;db-&gt;order_by("CURRENCY_ID", "asc"); 
  </code></pre>
  
  <p>Now i am using the $this->db->query()</p>
  
  <pre><code>$query = "SELECT * FROM tb_cash_transaction, tb_currency, tb_user where tb_cash_transaction.CURRENCY_ID=tb_currency.CURRENCY_ID and tb_cash_transaction.USER_ID=tb_user.USER_ID and TYPE='cash_out'";   
  $query = $this-&gt;db-&gt;query($query);
  </code></pre>
  
  <p>How to implement it? Thank you.</p>