Subject Re: AW: [firebird-php] Readonly connection with AdoDB
Author Lester Caine
Kaufmann Christian wrote:
>> Which version of ADOdb are you running?
> I use AdoDB "V5.11 5 May 2010" with PHP 5.3.6 / Apache 2.2 on a Windows machine.
>
> I use my PHP scripts only for displaying data, so in order to have as few overhead as possible all I want is to set my connection / transaction to readonly.

That is tailored for Interbase rather than Firebird ;)

So in the drivers/adodb-ibase.inc.php file -> BeginTrans();

$this->_transactionID = $this->_connectionID;//ibase_trans($this->ibasetrans,
$this->_connectionID);

changes to

$this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);

Then set your connection ->ibasetrans to the transaction level you want before
calling BeginTrans();
I've modified the 'default' to

$this->ibasetrans = IBASE_WAIT | IBASE_REC_VERSION | IBASE_COMMITTED;

Replaces
if (defined('IBASE_DEFAULT')) $this->ibasetrans = IBASE_DEFAULT;
around line 48 of the driver file ...

Just put your own setting in there.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php