Welcome Guest, Not a member yet? Register   Sign In
DB Caching and SQL_CALC_FOUND_ROWS
#1

[eluser]CI shocki[/eluser]
Hi guys,

I am using SQL_CALC_FOUND_ROWS and FOUND_ROWS() to get the total number of queries, which I need for pagination. Without caching this works.

FOUND_ROWS() displays the results of the last query. If I use caching there is no NEW query so mySQL will always take the FOUND_ROWS() from the last (uncached) query.

I also tried working with $this->db->count_all_results() which would work cause I didn't have to use SQL_CALC_FOUND_ROWS. But this gave me errors as described in this thread . I worked with the "hack" provided in this thread. But this seems to slow down things extremly.

Regards yanni
#2

[eluser]chamil sanjeewa[/eluser]
I think http://blindage.org/?p=1754 help to u
#3

[eluser]Anandafit[/eluser]
Thanks chamil. It worked charm Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB