PEAR's DB classes are one of the database abstraction layers. This article takes a look at some traditional database access methods and then compare them with the method employed by PEAR.
If you are writing an application that is used in multiple environments and operating systems, you need to plan to support multiple databases. This article is based on my experiences with multiple database systems, stretching from 4th Dimension in my Mac days, to the databases I currently use, which are: Oracle, FoxPro, Access, MS SQL Server and MySQL. Although most of the advice here applies to Perl, Python and other programming languages, we will focus on PHP and how the ADOdb database abstraction library offers some solutions.
In this Part 2 of the article "Building Next/Prev Buttons for Query Results," you will be shown a sample code designed to work in most instances (with minor changes).