Subject | Re: [firebird-php] transactions .... I thought I got it, little did I know. |
---|---|
Author | Lester Caine |
Post date | 2007-10-26T12:58Z |
Jochem Maas wrote:
PHP5? - PHP4 does not have some of the relevant facilities available they were
only added in PHP5.
I have not been having any trouble with this, but I tend to keep the data
local as well until I commit to the database. You do need to be careful
ensuring you are using the transaction handle rather than the connection one
when accessing within the transaction.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird - http://www.firebirdsql.org/index.php
> say I want to perform a number of inserts and treat them as a single transaction, no problem.Are you doing this JUST using ibase calls?
>
> now imagine I need to be able to interlace the inserts with select statements and that the select
> statements need to be able to read inserted records (has to do with calculated fields) that
> have not yet been committed ... is this even possible.
>
> i.e.
>
> 1. start with an empty table
> 2. start a transaction
> 3. insert a record into table
> 4. read back inserted record
> 5. determine whether to rollback or commit
>
> I can't get this to work at all - personally I think it is odd that within a single transaction
> it is not possible to perform select queries that can see data that has been inserted or updated
> (but not yet commited) within the confines of the same transaction.
>
> should this be possible? I am running FB 1.5.x, maybe I need to upgrade to FB2?
>
> hope someone can shed some light on this or maybe point me at a decent (aka understandable) tutorial
> on using transactions in firebird - I've read pretty much everything I kind find ... most of it is like
> http://php/net/ibase, namely, only very useful if you already understand how to use transactions properly.
PHP5? - PHP4 does not have some of the relevant facilities available they were
only added in PHP5.
I have not been having any trouble with this, but I tend to keep the data
local as well until I commit to the database. You do need to be careful
ensuring you are using the transaction handle rather than the connection one
when accessing within the transaction.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird - http://www.firebirdsql.org/index.php