DevShed.com has posted the latest in their pagination with PHP series - Part 3: Previous or Next? Paginating Records with PHP, the finaly part of the series.
In part three of our series about paginating records with PHP, we will learn how to make our application work with a relational database system such as MySQL. We will develop a tight, compact PHP class, capable of performing the most common paging tasks efficiently.
To meet real world needs, it's highly imperative to develop a tight, compact PHP class, capable of performing the most common paging tasks efficiently, with minor hassles at most. So, let's jump straight into the class code and create this new toy for our developer's toolbox.
They make the move from a plain-text flat-file over to the database realm, giving their class even more power. Actually, (in my opinion) pagination with MySQL in PHP is even easier than trying to format information from a plain-text file. Thanks to the LIMIT statement in MySQL, pages are easy to come by. It's frustrating when moving to other databases, though - LIMIT spoils you (and rownum in Oracle just doesn't feel the same...)




