I use Postgresql 7.0 + php-4.0.2 and I meet a problem with the

The problem is the famous example of the bank accounts and the money
My script php follows this steps :

        BEGIN WORK
        UPDATE the first bank account
        UPDATE the second bank account

While the sleep, the client uses the STOP button on his browser and
stops the connection.
The first update is accepted : it seems that the transaction is
autocommited when the execution is stopped. 

I find a solution with php by using ignore_user_abort() and
connection_aborted(). But I should prefer an other method.

For example anybody knows if it is possible to speficy the autocommit
to not when the connection is opened ?

In advance, thanks for your response.


ps : I test the same thing with Postgresql only and if the transaction
is not closed, the previous requests are "rollback" which is better for

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to