problem with pagination - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: problem with pagination (/showthread.php?tid=68813) |
problem with pagination - programmer - 08-29-2017 i use pagination in codeigniter . and show page number but dosn't show previous and next button controller code PHP Code: $config['base_url'] = base_url() . 'track/category/' . $title . '/page/'; model code : PHP Code: public function getDataByPaging($id, $limit, $start){ here RE: problem with pagination - InsiteFX - 08-30-2017 For one your creating your pagination links before you get you data from the database to display. Your create links show be last just before your load your view. RE: problem with pagination - programmer - 08-30-2017 (08-30-2017, 02:23 AM)InsiteFX Wrote: For one your creating your pagination links before you get you data from the database to display. I did the same, but did not change. RE: problem with pagination - sasbass - 08-31-2017 Try change $config['per_page'] = 3 RE: problem with pagination - InsiteFX - 08-31-2017 It could also be your uri_segment is wrong, use your web browsers development tools to see what the segments are being returned or echo out your segments and $page. Most likely you will find that your $page is always returning 0. |