Welcome Guest, Not a member yet? Register   Sign In
codeigniter pagination sorting one page
#1

Hi,

I got one task to done, but I don't have idea how to do. I use Codeigniter 2.x, and I need to read data from mysql and list in one table, table should have pagination and sorting possibility, but sorting should be only on one page. For instance, if data has 15 records and we will list all data with 5 records per page we will have 3 pages. 1 page - 1,2,3,4,5 2 page - 6,7,8,9,10 3 page - 11,12,13,14,15

And my question is if I am on page number 2, and I click reverse sorting to get result 10,9,8,7,6. On first page to get result 5,4,3,2,1 On third page to get result 15,14,13,12,11

I know how to reverse all query but I need only reverse per page, does anyone know how?

Thanks in advance
Reply
#2

may be you can run regular paging query with default sorting and before displaying in table you can again sort depending on your need.

  Dodgy -Abhijeet
Reply




Theme © iAndrew 2016 - Forum software by © MyBB