![]() |
Pagination - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Pagination (/showthread.php?tid=6513) |
Pagination - El Forum - 03-02-2008 [eluser]-spy-[/eluser] im not familiar with pagination, i followed the steps in the userguide, the created links were ok, but i cant limit the number of records for each page, for every page all records were retrieved..instead of 5 records for each page.. i really need your help Code: $config['base_url'] = "http://localhost/pupcommonwealth.edu.ph/administration/profile"; Pagination - El Forum - 03-02-2008 [eluser]Armchair Samurai[/eluser] You need to make two queries - one to retrieve the total number of rows, and one to retrieve the records for the current page using limit and offset. For example, in your model, you'd have something like this: Code: function get_records($limit, $offset) Pagination - El Forum - 03-02-2008 [eluser]-spy-[/eluser] tnx a lot..n_n |