I could write two or three articles on the DB class included in PEAR, which is why I'll only briefly cover its
use here. I use it flawlessly with MySQL and thus far my only complaint is that it uses sequence tables instead
of merely returning the insert id in MySQL's auto_increment fields.
This is the most basic of examples on how to use the DB class, but those of you who have used Perl's DBI or the many
PHP database functions will note the structure of connecting to a database is pretty much intact. One thing to
note is that the result is a separate class from the DB class with its own functions, etc. For a more detailed
overview of the DB class check out