Pagination not displaying results on next pages, can anybody help :-( [solved] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Pagination not displaying results on next pages, can anybody help :-( [solved] (/showthread.php?tid=41539) |
Pagination not displaying results on next pages, can anybody help :-( [solved] - El Forum - 05-10-2011 [eluser]boltsabre[/eluser] Hi guys, really hoping someone can help me with a pagination issue, I'm baffled. So, I've got all the code in, it looks like it's working: - when the view is first loaded I see the correct number of results as set in my paginationConfig variable. - I see the pagination at the bottom, with the correct number of 'pages' - When I click on the another page my url is changing to reflect the 'offset' for the databse/ model call (see below). - But when I click on another 'page' I just see no results from my db - no error messages, just nothing... Original URl when view loads: - www.mydomain.com/visas/forum/general-topics New URl when pagination link is clicked: - www.mydomain.com/visas/forum/general-topics/10 If someone could look at my code and suggest where I have gone wrong I'd be extremely grateful, a million thanks in advance!!! Controller code: Code: function general_topics($postID = null){ The view code Code: <?php if($forum_results){ ?> And finally the model Code: // this limit and offset are set in the controller in the pagination config array, needed to make pagination work Any help would be great, I've been stuck on this for hours now!!! Pagination not displaying results on next pages, can anybody help :-( [solved] - El Forum - 05-10-2011 [eluser]toopay[/eluser] You missed Code: $config['uri_segment'] = 4; Pagination not displaying results on next pages, can anybody help :-( [solved] - El Forum - 05-11-2011 [eluser]cideveloper[/eluser] Boltsabre, Please do not double post in different sections. Pagination not displaying results on next pages, can anybody help :-( [solved] - El Forum - 05-11-2011 [eluser]boltsabre[/eluser] cideveloper, I had originally posted this in the forum 'General CodeIgniter Discussion (no code)' by mistake (it seems to default to that for some reason, it just happened with another post of mine - I'll try really hard to check that before my next post). Anyway, I tried to delete my post in the wrong forum, but it wont let me - apparently I do not have the permissions to delete my own posts (say what.......???), and I then re-posted in the correct forum for those users in there who may find it helpful. Long story short, it was unintentional, I wont do it again. Pagination not displaying results on next pages, can anybody help :-( [solved] - El Forum - 05-11-2011 [eluser]cideveloper[/eluser] NP. I forgot to check the timestamp. It does seem wierd that we cannot delete our own posts. :bug: |