ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:committrans

This is an old revision of the document!


commitTrans

Syntax
void commitTrans()

Descriptions

The function commitTrans() commits a granular transaction. This function is not part of the smart transaction set, you must verify that all transactional statements within the transaction scope have completed correctly.


Usage

$conn->BeginTrans();
 
$ok = $conn->Execute($sql);
 
if ($ok) 
    $ok = $conn->Execute($sql2);
 
if (!$ok) 
    $conn->RollbackTrans();
 
else 
    $conn->CommitTrans();
 
v5/reference/connection/committrans.1492768231.txt.gz · Last modified: 2017/04/21 11:50 by 127.0.0.1