note 75112 added to function.mysqli-autocommit

From: Date: Sun, 13 May 2007 01:02:32 +0000
Subject: note 75112 added to function.mysqli-autocommit
Groups: php.notes 
Request: Send a blank email to php-notes+get-126470@lists.php.net to get a copy of this message
It's worth noting that you can perform transactions without disabling autocommit just using standard sql. "START TRANSACTION;" will start a transaction. "COMMIT;" will commit the results and "ROLLBACK;" will revert to the pre-transaction state. CREATE TABLE and CREATE DATABASE (and probably others) are always commited immediately and your transaction appears to terminate. Thus any commands before and after will be commited, even if a subsequent rollback is attempted. If you are in the middle of a transaction and you call mysqli_close() it appears that you get the funcitonality of an implicit rollback. I can't reproduce the "code bug causes lock" problem outlined below (I always get a successful rollback and the script will run umtine times successfully). Therefore, I would suggest that the problem is fixed in php-5.2.2. ---- Server IP: 194.145.210.4 Probable Submitter: 82.41.227.125 ---- Manual Page -- http://www.php.net/manual/en/function.mysqli-autocommit.php Edit -- https://master.php.net/note/edit/75112 Del: integrated -- https://master.php.net/note/delete/75112/integrated Del: useless -- https://master.php.net/note/delete/75112/useless Del: bad code -- https://master.php.net/note/delete/75112/bad+code Del: spam -- https://master.php.net/note/delete/75112/spam Del: non-english -- https://master.php.net/note/delete/75112/non-english Del: in docs -- https://master.php.net/note/delete/75112/in+docs Del: other reasons-- https://master.php.net/note/delete/75112 Reject -- https://master.php.net/note/reject/75112 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126470) next »