ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:settransactionmode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
reference:settransactionmode [2015/10/03 16:33] mnewnhamv5:reference:connection:settransactionmode [2018/06/11 10:23] (current) – [Usage] function names starting with lowercase (#426) dregad
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == See Also == == See Also ==
-[[dictionary:metatransaction|metaTransaction()]]+[[v5:dictionary:metatransaction|metaTransaction()]]
  
 == Syntax == == Syntax ==
Line 20: Line 20:
 ===== Usage ===== ===== Usage =====
 <code php>  <code php> 
- 
-/* 
-* Get the database isolation mode string 
-*/ 
-$transactionMode = $db->metaTransaction('serializable'); 
 /* /*
 * Set the mode * Set the mode
 */ */
-$db->SetTransactionMode($transactionMode); +$db->setTransactionMode('serializable'); 
-$8db->BeginTrans(); +$db->beginTrans(); 
-$db->Execute(...); $db->Execute(...); +$db->execute(...); $db->execute(...); 
-$db->CommitTrans();+$db->commitTrans();
    
 /* /*
 * restore to default * restore to default
 */ */
-$db->SetTransactionMode("");  +$db->setTransactionMode("");  
-$db->StartTrans(); +$db->startTrans(); 
-$db->Execute(...); $db->Execute(...); +$db->execute(...); 
-$db->CompleteTrans();+$db->execute(...); 
 +$db->completeTrans(); 
 </code> </code>
 Supported values to pass in: Supported values to pass in:
v5/reference/connection/settransactionmode.1443882785.txt.gz · Last modified: 2017/04/21 11:33 (external edit)