In a scenario I need to know the count of recordset a query will return, which in codeigniter can be done by $query->num_rows()
or $this->db->cou
Which one is better and what is the difference between these two
Its almost imposibble to me, someone just want to get the number of records without re-touching or perform another query which involved same resource. Furthermore, the memory used by these two function is in same way after all, since with count_all_result
you still performing get
(in CI AR terms), so i recomend you using the other one (or use count() instead) which gave you reusability benefits.