It is small, fast, and works very well.
// connect to database and load additional PEAR-compatible module
$db = ADONewConnection(“mainDB”, “pear”);
// turn debug info on
$db->debug = true;
// get one field
$maxID = $db->GetOne(“SELECT MAX(id) FROM myTable”);
// get one row as array
$lastRow = $db->GetRow(“SELECT * FROM myTable WHERE id=$maxID”);
// get whole table as 3D array
$records = $db->GetAll(“SELECT * FROM myTable ORDER BY someField”);
for ($i=0; $in”;
}