Nicer Pagination with ADOdb
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:

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.
Blast, you’ve taken down your version. Back to Google.
It was a typo. Fixed now.
hi, andar here, i just read your post. i like very much. agree to you, sir.
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?
[...] nice to see my original article still ranks high on [...]
In the article a huge thank you all for the cause, a lot of people are using
Leave your response!
Related Posts
Categories
Apache »
Block Countries in Apache
Assuming you have mod_geoip installed in apache we can block certain countries in 6 lines of code.
I had a client who was experiencing an inhumane amount of spam on their phpBB forums, which are notorious …
CubeCart »
Using Wordpress header and footers externally
I needed to integrate a Wordpress header (header.php) and footer (footer.php) into an external application.
There are quite a few ways round this, but none are really ideal. For example, if you want to include an …
HTML, CSS, AJAX »
Ajaxrain.com hits 1,000 entries mile stone
Back in August last year I posted about a new resource called Ajax Rain that lists Ajax/Javascript/Dhtml examples and demos. Well, now they’ve hit over 1,000 entries.
Sites like this come and go all the time, …
PHP »
Convert phpBB IP Addresses
phpBB stores its IP addresses in a funky format. They’re useless to the human eye!
Convert them to normal IPs with the following code
SELECT CONCAT( CONV( substring( poster_ip, 1, 2 ) , 16, 10 ) , …
Wordpress »
Facebook Chat for Pidgin
My favourite instant messenger application just got better! There is now a plugin for Facebook.
pidgin-facebookchat is a Facebook chat plugin for Pidgin and other libpurple based messengers. It connects to the new Facebook Chat IM …
Tag Cloud
Cache cache control campaign id clip credit credit cards credit crunch Cricket cut and paste database database error Download Duplicate ETags extra points getItemHash Google hash values jpg jpeg Linux mysql database mysql server paste job Performance performance grade php cgi proxy quick test recession score single line Sitemaps sql errors sql syntax Super trickery Turbo tweaking Unzip website Wordpress wp WP-O-Matic xml sitemap YSlowRecent Posts
Most Commented
Most Popular