Re: pear::db, INNO DB and transactions
| From: | Filippo Veneri | Date: | Fri, 12 Dec 2003 16:47:08 +0000 |
| Subject: | Re: pear::db, INNO DB and transactions | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9490@lists.php.net to get a copy of this message | ||
On Fri, 2003-12-12 at 12:37, Demian Turner wrote:
> ...
> anyone got transactions working with dataobjects?
> ...
Yes I did. The code I've used is attached, but don't ask me why it
works. It is a mere workaround.
In theory, the code in DataObject.php is correct:
function &getDatabaseConnection() {
global $_DB_DATAOBJECT;
$this->_connect();
$md5 = $this->_database_dsn_md5;
return $_DB_DATAOBJECT['CONNECTIONS'][$md5];
}
but in practice it does not return the correct object.
Inlining the code of this function to obtain a reference to a DB object
solved the problem.
The question now is: why the above function does not work?
cheers
Filippo
Attachment: [application/x-php] transactions.php
Attachment: [application/x-php] transactions.php