====== completeTrans ======
~~NOTOC~~
== See Also ==
[[v5:reference:connection:starttrans|startTrans()]]\\
[[v5:reference:connection:failtrans|failTrans()]]\\
[[v5:userguide:transactions|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();
{{tag>["Smart Transactions"]}}