Subject Re: [firebird-php] PHP and transactions
Author Jochem Maas
Lester Caine wrote:
> Milan Babuskov wrote:
>
>
>>Lester Caine wrote:
>>
>>
>>>OK - now that I have established that ADOdb does not currently actually
>>>handle transactions, I am playing with things in that area.
>>>In Builder I just call 'Refresh' to see the changes that happened in the
>>>transaction in the main connection.
>>>HOW do I do the same thing in PHP? Apart from dropping and re-making the
>>>connection?
>>
>>I don't use ADO. I simply commit the transaction and the next select
>>will fetch new data. Basically it is the same as "refresh" call.
>>
>>So, if you could just "commit", that would be enough I quess.
>
>
> I have the default connection, and use it to read data. I start a
> transaction, and make changes to several tables, but when I commit the
> transaction, the only way to get the default transaction to see the new
> data is to close and re-open the connection :(
> I don't have a problem if I start a new transaction, but then I have to
> keep that active rather than dropping back to simple saves.

you can nest transactions - rather than just using th default connection -
immeidately open up a (read-only) transaction and then use that transaction
identifier to open another read-write transaction which you can commit
for the changes to be available AFAICT. not sure why the changes are not being
seen in the default connection .... might this be to do with the $sync argument
to ibase_connect()? I can't find any info on what it does yet so that is a complete
stab in the dark.


>