Re: mysqli auto rollback on script termination
| From: | Chris | Date: | Mon, 09 Oct 2006 05:37:06 +0000 |
| Subject: | Re: mysqli auto rollback on script termination | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42513@lists.php.net to get a copy of this message | ||
Martin Koch Andersen wrote:
Hi, In case the PHP script dies (from fatal error, die() or similar), is any started transaction (BEGIN TRANSACTION) automatically rolled back (ROLLBACK) by PHP then?It should be rolled back when a connection is lost or a transaction isn't explicitly committed. Whether that's a php script dying or the server being shut down mid-transaction or anything similar (eg a remote server's lan connection goes down). Of course this assumes you're using innodb tables and not myisam - myisam doesn't support transactions.. -- Postgresql & php tutorials http://www.designmagick.com/