Welcome Guest, Not a member yet? Register   Sign In
Pagination issue
#4

[eluser]sv3tli0[/eluser]
Sorry, I am little sleepy let me be clear..
As I see at your code you are making 1 sql to catch data and second to catch count but with different WHERE clauses (first has few clauses and second counts all records)..

This way you have for example:
From 1st query you have 4 records with those where clauses.
And 26 counted at second count because there aren't any WHERE's.

Why you have comment the num_rows() ?
Code:
$config['total_rows'] =  $rows; //$q->num_rows();


This is the second query which is completely different from your first one.
Code:
$rows = $this->db->count_all('code');


Messages In This Thread
Pagination issue - by El Forum - 11-25-2013, 04:24 AM
Pagination issue - by El Forum - 11-25-2013, 05:52 AM
Pagination issue - by El Forum - 11-25-2013, 05:53 AM
Pagination issue - by El Forum - 11-25-2013, 06:01 AM
Pagination issue - by El Forum - 11-25-2013, 06:03 AM
Pagination issue - by El Forum - 11-25-2013, 06:08 AM
Pagination issue - by El Forum - 11-25-2013, 06:08 AM
Pagination issue - by El Forum - 11-25-2013, 06:15 AM
Pagination issue - by El Forum - 11-25-2013, 06:19 AM
Pagination issue - by El Forum - 11-25-2013, 06:22 AM
Pagination issue - by El Forum - 11-25-2013, 06:25 AM
Pagination issue - by El Forum - 11-25-2013, 06:59 AM
Pagination issue - by El Forum - 11-25-2013, 07:36 AM
Pagination issue - by El Forum - 11-25-2013, 07:39 AM
Pagination issue - by El Forum - 11-25-2013, 08:56 AM
Pagination issue - by El Forum - 11-25-2013, 09:34 AM
Pagination issue - by El Forum - 11-25-2013, 11:10 AM
Pagination issue - by El Forum - 11-25-2013, 11:14 AM
Pagination issue - by El Forum - 11-25-2013, 04:12 PM
Pagination issue - by El Forum - 11-25-2013, 04:15 PM
Pagination issue - by El Forum - 11-25-2013, 04:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB