ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


Action unknown: siteexport_addpage
v5:reference:connection:begintrans

beginTrans

Syntax
void beginTrans()

Descriptions

The function beginTrans() starts a new transaction. This function is not part of the smart transaction set.


Usage

$conn->beginTrans();
 
$ok = $conn->execute($sql);
 
if ($ok) 
    $ok = $conn->execute($sql2);
 
if (!$ok) 
    $conn->rollbackTrans();
else 
    $conn->commitTrans();
 
v5/reference/connection/begintrans.txt · Last modified: 2018/06/11 10:15 by dregad