Paginating Query Results
Pagination is a concept you’re familiar with even if you don’t know the term. When you use a search engine like Google, it displays the results as a series of pages and not as one long list. The view_users.php script could benefit from this same feature.
Paginating query results makes extensive use of the LIMIT SQL clause introduced in Chapter 4. LIMIT restricts which subset of the matched records are actually returned. To paginate the returned results of a query, each page will run the same query using different LIMIT parameters. These parameters will also be passed from page to page in the URL, like the user IDs passed from the view_users.php page.
Another, more cosmetic technique will be demonstrated here: displaying ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access