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();
- }
Located in /Data/TDbTransaction.php (line 42)
TComponent | --TDbTransaction
Constructor.
Commits a transaction.
Rolls back a transaction.
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:34:54 -0400 by phpDocumentor 1.3.0RC4