// setup
ADODB_Active_Record::SetDatabaseAdapter($db);
class Product extends ADODB_Active_Record {};
// Example1: create new record, then update
$activeRec = new Product(); // access Products table
$activeRec->name = 'New Name';
$activeRec->price = 43.90;
$activeRec->save(); // perform insert
$activeRec->name = 'Renamed';
$activeRec->save(); // update the same record
// Example 2: load existing record, then update
$activeRec2 = new Product();
$activeRec2->Load('id=4'); // load record using SELECT * FROM Products WHERE id=4
$activeRec2->price *= 1.1; // change price
$activeRec2->save(); // perform update
// return an array of ActiveRecords for processing...
$activeRecArray = $db->GetActiveRecords($table,"name like 'A%'");
foreach($activeRecArray as $rec) {
...