Home » HTML, CSS, AJAX, PHP

Nicer Pagination with ADOdb

Submitted by Kieran on Saturday, 7 July 20077 Comments

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.

example.JPG

Download, download, download;

It uses some icons I created stole from Mark James of Fam Fam Fam fame.

Related posts:

  1. Retro Fitting Record Pagination with ADOdb
  2. XHTML Transitional Compliant Paging with ADOdb
  3. Idiot Proof Lightbox
  4. 3 Favourite SEO Related Firefox Extensions
  5. SQLyog Query Profiler

7 Comments »

  • Olavo Alexandrino said:

    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.

    ;)

  • Colin Morris said:

    Blast, you’ve taken down your version. Back to Google.

  • Kieran (author) said:

    It was a typo. Fixed now.

  • andar909 said:

    hi, andar here, i just read your post. i like very much. agree to you, sir.

  • IssacFrost said:

    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?

  • Retro Fitting Record Pagination with ADOdb | kieran barnes | kieranbarnes said:

    [...] nice to see my original article still ranks high on [...]

  • Vsevolod said:

    In the article a huge thank you all for the cause, a lot of people are using

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Related Posts


Fatal error: Call to a member function have_posts() on a non-object in /home/blokeor/public_html/wp-content/themes/arthemia-premium/single.php on line 110