ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:completetrans

completeTrans

See Also

startTrans()
failTrans()
Managing Transaction With ADOdb

Syntax
void completeTrans(
   optional bool $completeTrans=true
   )

Description

The method completeTrans() completes a smart transaction. If the value of $completeTrans is set to false, a rollback is forced.


Usage

/*
 * Assume database connection
 */
$db->startTrans();
 
/*
 * execute the inserts etc
 */
 
/*
 * Complete the transaction
*/
$db->completeTrans();
v5/reference/connection/completetrans.txt · Last modified: 2016/08/13 19:05 by mnewnham