Nicer Pagination with ADOdb
Posted on July 7, 2007
Or should that be Nicr? To follow in an annoying theme.
Olavo Alexandrino wrote a nice well rounded class for record set pagination in ADOdb. If you've ever used ADOdb's version, you will know it is not very good, to say the least.
Although Olavo did a fantastic job on the logic, the presentation left a little to be desired from my perspective.
I am providing my modifed version for download below, it provides a few logic updates and better presentation.
It includes the following features;
- Setting current page
- Setting the records listed in each page
- Setting the total number of records that were retrieved
- Setting the query for searching records
- Using the same query to gets the total number of records
- Defining the additional parameters that may be necessary on the search and will be passed between pages with the GET method.
- Outputs the total number of records
- Outputs the total number of pages based on to the number of records in each page
- Outputs the values of the records of the current page
- Outputs the links for browsing from 1 to 10, 11 to 20, 21 to 30, and so on.
It has been tested on MySQL version 3.23.56-nt, Microsoft SQL Server 2000 and Microsoft Access 2002 by Olavo and on MySQL version 5 by myself.
Download, download, download;
- Download Olavo's genericpagination-2004-01-20.zip
- Download mine easypager-kb.zip
It uses some icons I created stole from Mark James of Fam Fam Fam fame.
Related posts
- Retro Fitting Record Pagination with ADOdb
For my first project of the New Year I had to retro-fit pagination controls to... - ADOdb’s GetMenu() function moreAttr bug
I'm sure there is a bug with ADOdb's GetMenu() function The documentation suggests 'use $moreAttr... - XHTML Transitional Compliant Paging with ADOdb
Following on from my previous post, I've cleaned up the getNavigation() function to generate XHTML... - CubeCart 4 Released
CubeCart 4 has just been released. CubeCart 3 had been my choice of ecommerce store... - ADOdb Document Library for PHP
I've decided to mirror the ADOdb Documentation as the developers have taken it offline due...



July 8th, 2007 - 06:10
I fell happy to know that a component made some time ago helps continually developers around the World.
Yes, the presentation logic is not good enough.
Thanks by your adaptation and your comments.
May 13th, 2008 - 02:44
Blast, you’ve taken down your version. Back to Google.
May 14th, 2008 - 22:32
It was a typo. Fixed now.
August 11th, 2008 - 08:15
hi, andar here, i just read your post. i like very much. agree to you, sir.
September 3rd, 2008 - 11:24
Any resources for databases are most welcome. Thanks for this download. I’ll be sure to check both of them out.
One question how do you get a download like that in your blog?
November 6th, 2008 - 06:35
In the article a huge thank you all for the cause, a lot of people are using
February 21st, 2010 - 01:25
thanks but we don like gnu license, nice work, but we can never use this.
February 21st, 2010 - 01:26
of couse also not have donations