Dynamic records per page
Dynamic records per page
dieegov
Posts: 2Questions: 1Answers: 0
Hello, how i do that?
In my case, i have all records in my db with line and page.
Records e.g
id | pag | desc
------------------------
1 | 1 | Foo
2 | 2 | Bar
3 | 1 | Foo Bar
4 | 1 | Bar Foo
------------------------
Now i need set records to correct page (eg: Record #1 to page 1, Record #2 to page 2, Record #3 to page 1).
Tips?
This discussion has been closed.
Answers
Allan would have a better idea if this is doable in any sort of easy way using the datatables pagination, but I would doubt it would easy if possible at all.
This is what I would suggest is to instead which seems much easier and wouldn't make datatables perform in a way it isn't meant to be used. Make a single table showing all of the page 1 records on load. Have another query on page load that will get all the unique pages from your database, and build a row of buttons similar to the pagination look if that is what you want. Then when they click on your "2" button, you reload the table with only page 2 data.
I think in this possibility, thanks for reply.