ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:rollbacktrans

Differences

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

Link to this comparison view

Next revision
Previous revision
reference:rollbacktrans [2015/08/07 03:24] – created mnewnhamv5:reference:connection:rollbacktrans [2016/01/17 01:13] (current) – ↷ Page moved from v5:reference:rollbacktrans to v5:reference:connection:rollbacktrans mnewnham
Line 2: Line 2:
 ~~NOTOC~~ ~~NOTOC~~
 <WRAP right box> <WRAP right box>
-== See Also == 
-[[reference:starttrans|startTrans()]] 
- 
-[[reference:completetrans|completeTrans()]] 
- 
 == Syntax == == Syntax ==
   void rollbackTrans()   void rollbackTrans()
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The function ''rollbackTrans()'' forces a roll back of a **smart transaction**. The rollback actually occurs at the point where ''completeTrans()'' is invoked.+The function ''rollbackTrans()'' forces a roll back of a granular transaction.
    
 ===== Usage ===== ===== Usage =====
Line 23: Line 18:
  * some reason to rollback transaction  * some reason to rollback transaction
  */  */
- +if ($someError) 
-$db->rollbackTrans();+    $db->rollbackTrans(); 
 +else 
 +    $db->commitTrans()
 </code> </code>
    
v5/reference/connection/rollbacktrans.1438910677.txt.gz · Last modified: 2017/04/21 11:33 (external edit)