kohana-paginate
kohana-paginate copied to clipboard
Paginate abstraction supporting Database, ORM, ORM-REST and Dispatch.
Get total pages and paginate by page. ``` php $data = DB::select()->from('table'); $data = Paginate::factory($data)->page(1, 10)->execute(); $result = $data->result(); $total_pages = $data->count_pages(); ``` Also, remove mysql_real_escape_string (conflict with mysqli).
Set page number and get total pages.
I added to this class a method to get the total of pages of the result. Hope this helps.
Hi, mysql_real_escape_string will be removed in future, please add alternative to mysql_real_escape_string in `Kohana_Paginate_Database::_sort` and `Kohana_Paginate_Database::_search` source: http://www.php.net/mysql_real_escape_string