Re: Transactions in mdb2

From: Date: Wed, 22 Mar 2006 16:37:57 +0000
Subject: Re: Transactions in mdb2
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23392@lists.php.net to get a copy of this message
Lukas Smith scrisse in data 03/22/06 17:03:
ah yes .. this is done at connect .. so use MDB2::connect() instead of MDB2::factory()
Thank you very much Lukas but I have no solved my problems... in effect now supports('transactions') return true but if I begin a transaction, rollback doesn't work. That's the code I've used:
    [...cut...]
    $options['use_transactions'] = true;
    $options['default_table_type'] = 'InnoDB';
               $mdb2=& MDB2::connect($dsn, $options);
       if ($mdb2->supports('transactions'))
        $mdb2->beginTransaction();
       $strSQL= 'INSERT INTO [...cut...]';
       if ($mdb2->in_transaction)
        $mdb2->rollback();
and I have a commit not a rollback... :-( Piviul

« previous php.pear.general (#23392) next »