I thought I would ask because I'm not sure that the result of this operation did not work with transactions very rudely.
When an exception is thrown in PHP, how is the database transaction handled. Does it automatically roll back from the moment the connection to the database is removed from PHP or are the locks in place?
Pseudo code
TX Begin
Select Balance
Logic in PHP
Exception
Rollback
Commit
Note: I know that best coding practice dictates that I roll back to catch. This is just the behavioral question I asked about.
source
share