DB_DataObject and transactions

From: Date: Thu, 31 Oct 2002 09:23:22 +0000
Subject: DB_DataObject and transactions
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2576@lists.php.net to get a copy of this message
Hi, is any way to use several DataObjects within one transaction? As I understand each instance of DataObject creates own connection and so new trancaton begins. PostgreSQL doesn't support nested transactions, so I have such situation: $do1 = new DO_Type1; $do1->query('begin work'); ... loop ... $do1->insert(); ... end loop ... $do2 = new DO_Type2; $do2->insert(); $do1->query('rollback'); and $do2 insert operation doesn't rollback. May be I do something wrong? Please help. Andrew Djachenko

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