本文整理汇总了PHP中Tinebase_TransactionManager::commitTransaction方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_TransactionManager::commitTransaction方法的具体用法?PHP Tinebase_TransactionManager::commitTransaction怎么用?PHP Tinebase_TransactionManager::commitTransaction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_TransactionManager
的用法示例。
在下文中一共展示了Tinebase_TransactionManager::commitTransaction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testOneDbSingleTransaction
/**
* test one single transaction
*/
public function testOneDbSingleTransaction()
{
$db = Zend_Registry::get('dbAdapter');
$this->_createDbTestTable($db);
$transactionId = $this->_instance->startTransaction($db);
$db->insert($this->_testTableName, array('Column1' => $transactionId));
$this->_instance->commitTransaction($transactionId);
$columns = $db->fetchAll("SELECT * FROM " . $this->_testTableName . " WHERE " . $db->quoteInto($db->quoteIdentifier('Column1') . ' = ?', $transactionId) . ";");
$this->assertEquals(1, count($columns), 'Transaction failed');
$this->assertEquals($transactionId, $columns[0]['Column1'], 'Transaction was not executed properly');
}
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:14,代码来源:TransactionManagerTest.php