$t1 = db::Begin();
$t2 = db::Begin();
$t2->Query("--action to be rolled back");
$t1->Query("--action to be commited");
$t2->Rollback();
$t1->Commit();
BEGIN;
SAVEPOINT 1;
--action to be rolled back
--action to be commited
ROLLBACK TO SAVEPOINT 1;
--action to be commited
COMMIT;
Will be executed as