The getListOf() method lets you query the database for information on available databases, users, views, and functions:
$data = $db->getListOf(what);
Thewhat parameter is a string identifying the database feature to list. Most databases support"databases;"some support"users," "views,"and"functions."
For example, this stores a list of available databases in$dbs:
$dbs = $db->getListOf("databases");
Transactions
Some RDBMSs support transactions, in which a series of database changes can be committed (all applied at once) or rolled back (discarded, with the changes not applied to the database). For example, when a bank handles a money transfer, the withdrawal from one account and deposit into another must happen together—neither should happen without the other, and there should be no time between the two actions. PEAR DB offers the commit () and rollback() methods to help with transactions:
$res = $db->commit(); $res = $db->rollback();
If you callcommit()orrollback()on a database that doesn’t support transactions, the methods returnDB_ERROR.
Be sure to check your underlying database product to ensure that it supports transactions.