Welcome Guest, Not a member yet? Register   Sign In
class pagination produce wrong page links
#5

[eluser]smilie[/eluser]
@jobin dcruz:
As JasonS stated, you are looking wrong at the code.

total_rows is how many results are there to paginate.
Let's say:

total_rows = 100;
per_page = 10;

Then, you will have total of 10 links (10 x 10 = 100);
If you set:
per_page = 5;
you will end up with 20 pagination links (5 x 20 = 100).

URL: http://example.com/index.php/test/page/5
The number 5 means in pagination class where to start from in total_rows on that page.
So, when you click it, pagination class will do:
show $per_page from $total_rows and start at 5
in other words:
show 5 results, from total of 100 results but start showing from result 5 (to 10).

So, link is correct. You are simply looking wrong at it :-)

Regards,
Smilie


Messages In This Thread
class pagination produce wrong page links - by El Forum - 09-08-2010, 12:44 AM
class pagination produce wrong page links - by El Forum - 09-08-2010, 02:54 AM
class pagination produce wrong page links - by El Forum - 09-08-2010, 03:38 AM
class pagination produce wrong page links - by El Forum - 09-08-2010, 05:27 AM
class pagination produce wrong page links - by El Forum - 09-08-2010, 09:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB