title: difference between $query>num_rows() and $this->db->count_all_results() in CodeIgniter & which one is recommended
body: <p>In a scenario I need to know the count of recordset a query will return, which in codeigniter can be done by <code>$query-&gt;num_rows()</code> or <code>$this-&gt;db-&gt;count_all_results()</code>. Which one is better and what is the difference between these two?</p>