libraries/ManiaLib/Database/Connection.php
function beginTransaction()
    {
        if ($this->transactionRollback) {
            throw new Exception('Transaction must be rollback\'ed!');
        }
        if ($this->transactionRefCount === null) {
            $this->execute('BEGIN');
            $this->transactionRefCount = 1;
        } else {
            $this->transactionRefCount++;
        }
    }
function beginTransaction()
    {
        if ($this->transactionRollback) {
            throw new Exception('Transaction must be rollback\'ed!');
        }
        if ($this->transactionRefCount === null) {
            $this->execute('BEGIN');
            $this->transactionRefCount = 1;
        } else {
            $this->transactionRefCount++;
        }
    }
ACID Transactions
ONLY WORKS WITH INNODB TABLES !

----

It handles EXPERIMENTAL (== never tested!!!) nested transactions
one "BEGIN" on the first call of beginTransaction
one "COMMIT" on the last call of commitTransaction (when the ref count is 1)
one "ROLLBACK" on the first call of rollbackTransaction