Does a PHP MySQL Transaction make only one call to the server? -


when using php , mysql transaction - in example below.

$db->begintransaction();      // set of queries; if 1 fails, exception should thrown     $db->query('first query');     $db->query('second query');     $db->query('third query');  $db->commit(); 

does make 1 call server?

or multiple calls?

welcome world of mvcc, or multi-version concurrency control, fancy way of saying transaction creates temporary alternate reality changes applied until commit changes nobody else can see them. when committed database merges changes main database. if rollback it's never happened.

this makes 5 calls server, 1 open transaction, 3 insert data, , 1 commit.

the transaction creates atomic operation, either succeeds or fails single unit, if it's composed of 5 individual operations.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -