ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:completetrans

completeTrans

See Also

startTrans()
failTrans()
Managing Transaction With ADOdb

Syntax
bool completeTrans(
   optional bool $completeTrans=true
   )

Description

The method completeTrans() completes a smart transaction.

If the value of parameter $completeTrans is set to false, a rollback is forced.

Returns true on commit, false on rollback.


Usage

/*
 * Assume database connection
 */
$db->startTrans();
 
/*
 * execute the inserts etc
 */
 
/*
 * Complete the transaction
*/
$db->completeTrans();
v5/reference/connection/completetrans.txt · Last modified: 2021/04/26 13:54 by peterdd