Home / Codeigniter count_all_results without reset query

Codeigniter count_all_results without reset query

If you want to count total data from table before get result then you can follow below codes.

$this->select('Name');
$TotalData  = $this->db->count_all_results('users', false);
$this->limit(10, 1);
$Query = $this->db->get();

all rights reserved