Welcome Guest, Not a member yet? Register   Sign In
Pagination with dynamic filtered data
#1

[eluser]lennierb5[/eluser]
I'm wondering what the best way to overcome filtered data that can be dynamically changed thus altering the results to offset by.

Example:

I have 100 results filtered by a database column being NULL. I set my pagination to 20 rows and on the first page display those 20 rows. On this page the user can change the column being filtered to another value besides NULL through AJAX.

If they change any of these values on the first page the second pagination link will miss some of the data when the new query is ran with that offset.

The only way I can think to overcome this is to always order my data by a unique ID and save that ID on each page and pass that to look for values greater than the last ID displayed and match the filter.

Is there a better option to try besides this?




Theme © iAndrew 2016 - Forum software by © MyBB