Class TDbTransaction
TDbTransaction class.
TDbTransaction represents a DB transaction. It is usually created by calling
TDbConnection::beginTransaction()
.
The following code is a common scenario of using transactions:
try { $transaction=$connection->beginTransaction(); $connection->createCommand($sql1)->execute(); $connection->createCommand($sql2)->execute(); //.... other SQL executions $transaction->commit(); } catch(Exception $e) { $transaction->rollBack(); }
- TComponent
-
TDbTransaction
Package: System\Data
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Data/TDbTransaction.php
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Data/TDbTransaction.php
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
protected
|
GLOBAL_RAISE_EVENT_LISTENER
|