[eluser]sudesh[/eluser]
Hi all,
Can we some how again load the last executed query in db object, and change few parameters
below is what i exactly mean,
$this->db->select('field1, field2');
$this->db->where('field1', 'something');
$this->db->where('field2', 'something');
$this->db->limit($offset, $row_count);
Now what i want is to change the select of last query to
$this->db->select('count(*) as cnt');
and remove limit.
so that i can get total row count.
i know i can get it by using last_query, but my table has 1000's of records loading them just for getting count is waste(inefficient), trying to find some other alternative.