From the course: PHP: Object-Oriented Programming with Databases
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Pagination concepts - PHP Tutorial
From the course: PHP: Object-Oriented Programming with Databases
Pagination concepts
- In this chapter we're going to learn how to do object-oriented pagination. We will begin by talking about some of the underlying concepts that make pagination work. The reason we need pagination is to manage large sets of data. Let's imagine that instead of having just 10 bicycles in our database, we had 1,000, or even 10,000, or 100,000. We probably would not want to view all of those bicycles on a single page at one time. It would be visually overwhelming, but it also requires server to do a lot of work to retrieve that many records from the database, and then to instantiate them, and turn them into PHP objects. It would take a lot of time and a lot of memory. We probably don't want to do that. So instead, pagination allows us to just show a subset of records, and then, when we want to see more records, there are links that will take us to other pages of the results. Typically you would have previous or next…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.