Subject | Re: [firebird-php] transaction problem |
---|---|
Author | Leonardo Cosmai |
Post date | 2004-11-15T22:01:38Z |
Il Mon, 15 Nov 2004 20:10:57 -0000
"leonbadman" <leonardo.cosmai@...> ha scritto:
BEFORE:0
AFTER (CONN):1
AFTER (TRAN):1
AFTER (TRAN1):3
AFTER COMMIT (CONN):1
Ciao, L.
(Linux User #332241)
-----------------------
afortune4u!
Regole di Goldenstern:
(1) Assumi sempre un avvocato ricco.
(2) Non comprare mai da un venditore ricco.
"leonbadman" <leonardo.cosmai@...> ha scritto:
>very strange...try to swap the sequence:
> $transaction = ibase_trans(IBASE_DEFAULT, $connection);
> $transaction1 = ibase_trans(IBASE_DEFAULT, $connection);
>
>
> $pstm = ibase_prepare($connection, "SELECT COUNT(*) AS N FROM T");
> $rs = ibase_execute($pstm);
> $r = ibase_fetch_object($rs);
> echo "BEFORE:" . $r->N . "<br>";
> ibase_free_query($pstm);
>
> ....
> BEFORE:0
> AFTER (CONN):2
> AFTER (TRAN):2
> AFTER (TRAN1):3
> AFTER COMMIT (CONN):5
> $pstm = ibase_prepare($connection, "SELECT COUNT(*) AS N FROM T");now the result is:
> $rs = ibase_execute($pstm);
> $r = ibase_fetch_object($rs);
> echo "BEFORE:" . $r->N . "<br>";
> ibase_free_query($pstm);
> $transaction = ibase_trans(IBASE_DEFAULT, $connection);
> $transaction1 = ibase_trans(IBASE_DEFAULT, $connection);
BEFORE:0
AFTER (CONN):1
AFTER (TRAN):1
AFTER (TRAN1):3
AFTER COMMIT (CONN):1
Ciao, L.
(Linux User #332241)
-----------------------
afortune4u!
Regole di Goldenstern:
(1) Assumi sempre un avvocato ricco.
(2) Non comprare mai da un venditore ricco.