ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:hasfailedtrans

hasFailedTrans

See Also

Managing Transactions With ADOdb

Syntax
bool hasFailedTrans()

Description

The function hasFailedTrans() reports if a smart transaction has failed, or if the failTrans() method has been called. The method must be called before completeTrans(), otherwise it will not report correctly.

Usage

$db->startTrans()
/*
 * Table updates, correct?
 */
if ($db->hasFailedTrans())
{
    /*
     * Do something
     */
}
$db->completeTrans();
v5/reference/connection/hasfailedtrans.txt · Last modified: 2016/03/19 03:23 by mnewnham