Pagination, offset issue |
[eluser]1cookie1[/eluser]
hi I'm having problems with a pagination script. Ive searched the forums and found a lot of uesful stuff but alas i can't get my script to work. ![]() article came close and I adopted some their code - but still my pagination links don't work correctly. OK, my code: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> There are 17 rows in total in my db, table = 'books' My test URIs are: http://localhost/CIgniter/index.php/books/index/1 http://localhost/CIgniter/index.php/books/index/2 http://localhost/CIgniter/index.php/books/index/3 http://localhost/CIgniter/index.php/books/index/4 If I type these manually in my address bar in my browser I get correct results; i.e. the script pulls records: 1 - 5 6 - 10 11 - 15 & lastly records 16 & 17, displaying these to the screen. (please see attached ss) My links display like: 1 2 3 > Last Clicking on link 2 displays: http://localhost/index.php/books/index/5, in my browser address bar and in the page body I get a 404 error The requested URL /index.php/books/index/5 was not found on this server. Clicking on link 3 displays: http://localhost/index.php/books/index/10, followed by 404 error The requested URL /index.php/books/index/10 was not found on this server. And so on. Click on Last and get: http://localhost/index.php/books/index/15 404! Not found. It's not the uri segment number as I have confirmed that this is correct by manually typing the uri s above. For a relatively simple concept such as offset and limit, I'm struggling a bit. Help please. ![]() |
Messages In This Thread |
Pagination, offset issue - by El Forum - 01-12-2010, 04:48 AM
Pagination, offset issue - by El Forum - 01-13-2010, 08:16 AM
Pagination, offset issue - by El Forum - 01-13-2010, 11:15 AM
Pagination, offset issue - by El Forum - 01-13-2010, 04:09 PM
Pagination, offset issue - by El Forum - 01-13-2010, 07:15 PM
Pagination, offset issue - by El Forum - 01-14-2010, 03:09 AM
Pagination, offset issue - by El Forum - 01-14-2010, 04:47 AM
Pagination, offset issue - by El Forum - 01-14-2010, 05:24 AM
|