ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:userguide:transactions

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
Next revisionBoth sides next revision
v5:userguide:transactions [2016/02/27 17:16] – [Smart Transactions] mnewnhamv5:userguide:transactions [2016/04/14 15:28] – [Granular Transactions] mnewnham
Line 27: Line 27:
 [[v5:reference:connection:begintrans|beginTrans()]]\\ [[v5:reference:connection:begintrans|beginTrans()]]\\
 [[v5:reference:connection:rollbacktrans|rollbackTrans()]]\\ [[v5:reference:connection:rollbacktrans|rollbackTrans()]]\\
-[[v5:reference:connection:completetrans|completeTrans()]]+[[v5:reference:connection:completetrans|completeTrans()]]\\ 
 +== See Also == 
 +[[v5:reference:connection:transOff|Temporarily Disabling Transactions]]\\ 
 +[[v5:reference:connection:transCnt|Checking Transaction Status]]\\
 </WRAP> </WRAP>
 When using granular transactions, it is the duty of the programmer to check whether a transaction execution has succeeded or failed. This allows the code to branch as desired in the case of a transaction failure. When using granular transactions, it is the duty of the programmer to check whether a transaction execution has succeeded or failed. This allows the code to branch as desired in the case of a transaction failure.
Line 119: Line 122:
 </code> </code>
  
-You can also check if a transaction has failed, using [[v5:reference:connection:hasfailedtrans]], which returns true: +You can also check if a transaction has failed, using [[v5:reference:connection:hasfailedtrans|hasFailedTrans()]], which returns true: 
-  * if [[v5:reference:connection:failtrans]] was called,  +  * if [[v5:reference:connection:failtrans|failTrans()]] was called,  
-  * There was an error in the SQL execution. +  * There was an error in the SQL execution. This execution comprises all scenarios where the SQL statement was successfully issued, but failed to complete. This does not include scenarios where the construction of the statement failed, and an error occurred that was trapped by PHP error handling.
  
 Make sure you call ''hasFailedTrans()'' before you call ''completeTrans()'', as it is only works between StartTrans/CompleteTrans. Make sure you call ''hasFailedTrans()'' before you call ''completeTrans()'', as it is only works between StartTrans/CompleteTrans.
v5/userguide/transactions.txt · Last modified: 2020/08/26 10:09 by dregad