<?php
// Once you have a valid DB object named $db...
$db->autoCommit(false);
$db->query('INSERT INTO blah (a) VALUES (11)');
$res =& $db->query('SELECT b FROM blue');
if (DB::isError($res)) {
echo $res->getMessage() . "\n";
}
while ($res->fetchInto($row, DB_FETCHMODE_ORDERED)) {
if ($row[0] == 'problem') {
$db->rollback();
}
}
$res->free();
$db->query('DROP TABLE blah');
$db->commit();
?>