ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:hasfailedtrans

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:hasfailedtrans [2015/12/29 20:22] mnewnhamv5:reference:connection:hasfailedtrans [2016/03/19 03:23] (current) mnewnham
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == See Also == == See Also ==
-[[userguide:transactions|Managing Transactions With ADOdb]]+[[v5:userguide:transactions|Managing Transactions With ADOdb]]
 == Syntax == == Syntax ==
   bool hasFailedTrans()   bool hasFailedTrans()
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The function ''hasFailedTrans()'' reports if a smart transaction has failed, or if the [[reference:failTrans()]] method has been called. The method must be called before [[reference:completeTrans()]], otherwise it will not report correctly.+The function ''hasFailedTrans()'' reports if a smart transaction has failed, or if the [[v5:reference:connection:failtrans|failTrans()]] method has been called. The method must be called before [[v5:reference:connection:completetrans|completeTrans()]], otherwise it will not report correctly.
  
 ===== Usage ===== ===== Usage =====
 <code php> <code php>
-$db->beginTrans()+$db->startTrans()
 /* /*
  * Table updates, correct?  * Table updates, correct?
  */  */
 if ($db->hasFailedTrans()) if ($db->hasFailedTrans())
 +{
     /*     /*
      * Do something      * Do something
-     * /+     */ 
 +
 +$db->completeTrans();
 </code> </code>
 {{tag>["Smart Transactions"]}} {{tag>["Smart Transactions"]}}
v5/reference/connection/hasfailedtrans.1451416949.txt.gz · Last modified: 2017/04/21 11:34 (external edit)