Chapter 11. Pagination
In the previous chapter, we managed to fetch all the records from the database and display them inside a table. That implementation is fine for a bunch of records, but in the real world, when you have to work with thousands or millions of records, you cannot simply fetch them and place them inside an array. If you do so, your browser will not be happy to load such an amount of data, but even if it manages to do that, then I assure you that no user likes dealing with a table containing 100,000 rows.
Pagination is used in some form in almost every web application to divide returned data and display it on multiple pages. Pagination also includes the logic of preparing and displaying the links to the various pages, and it ...