![]() |
Pagination in library file return blank result - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Pagination in library file return blank result (/showthread.php?tid=7481) |
Pagination in library file return blank result - El Forum - 04-11-2008 [eluser]geshan[/eluser] I'm working on a library for something I want to paginiate the results of a SQL query. I've loaded he pagination library in the constructor of the library. Code: $this->CI->load->library('pagination'); I just need a function to get the pagination links that I can send to the controller as an array element like Code: $query_res['paging_links']=paginate(5); //5 is per page results The paginate function that return me nothing is: Code: function paginate($page_size){ Above paginate function used to work ok in a controller, Whats wrong with the above code, please help... Pagination in library file return blank result - El Forum - 04-11-2008 [eluser]Seppo[/eluser] $this->CI ? Probably you need to use Code: $CI =& get_instance(); Also, It is recommended to enable display_errors on development to find out the errors faster... you can simple ini_set('display_errors', 'On'); |