PHP class representing a database transaction with commit, rollback, and isolation level support.
// Source: https://github.com/yiisoft/yii2 | License: BSD-3-Clause | Copyright 2008 by Yii Software (https://www.yiiframework.com/)
// Provided via justclaw.it.com; keep this notice with the code.
<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license https://www.yiiframework.com/license/
*/
namespace yii\db;
use Yii;
use yii\base\InvalidConfigException;
use yii\base\NotSupportedException;
/**
* Transaction represents a DB transaction.
*
* It is usually created by calling [[Connection::beginTransaction()]].
*
* The following code is a typical example of using transactions (note that some
* DBMS may not support transactions):
*
* ```
* $transaction = $connection->beginTransaction();
* try {
* $connection->createComm
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key