本文整理汇总了PHP中sqlsrv_rollback函数的典型用法代码示例。如果您正苦于以下问题:PHP sqlsrv_rollback函数的具体用法?PHP sqlsrv_rollback怎么用?PHP sqlsrv_rollback使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sqlsrv_rollback函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: transactionRollback
/**
* Rollback or revert to a savepoint if your queries encounter problems
* If you encounter a problem at any point during a transaction, you may
* need to rollback that particular query, or return to a savepoint
*/
public function transactionRollback()
{
$result = sqlsrv_rollback($this->dbConn);
if (!$result) {
$this->databaseError("Couldn't rollback the transaction.");
}
}
示例2: rollbackTransaction
public function rollbackTransaction()
{
if ($this->transactionOn) {
//$this->execute('ROLLBACK TRANSACTION');
sqlsrv_rollback($this->connection);
$this->transactionOn = false;
}
}
示例3: trans_rollback
function trans_rollback()
{
if (!$this->trans_enabled) {
return TRUE;
}
if ($this->_trans_depth > 0) {
return TRUE;
}
return sqlsrv_rollback($this->conn_id);
}
示例4: rollback
/**
* 事务回滚
* @access public
* @return boolean
*/
public function rollback()
{
if ($this->transTimes > 0) {
$result = sqlsrv_rollback($this->_linkID);
$this->transTimes = 0;
if (!$result) {
$this->error();
return false;
}
}
return true;
}
示例5: _rollBack
/**
* Roll back a transaction and return to autocommit mode.
*
* @return void
* @throws Zend_Db_Adapter_Sqlsrv_Exception
*/
protected function _rollBack()
{
if (!sqlsrv_rollback($this->_connection)) {
require_once 'Zend/Db/Adapter/Sqlsrv/Exception.php';
throw new Zend_Db_Adapter_Sqlsrv_Exception(sqlsrv_errors());
}
}
示例6: rollback_transaction
public function rollback_transaction()
{
sqlsrv_rollback($this->connection);
}
示例7: trans_rollback
/**
* Rollback Transaction
*
* @access public
* @return bool
*/
function trans_rollback()
{
if (!$this->trans_enabled) {
return TRUE;
}
// When transactions are nested we only begin/commit/rollback the outermost ones
if ($this->_trans_depth > 0) {
return TRUE;
}
return sqlsrv_rollback($this->conn_id);
}
示例8: rollback
/**
* Rollback
*/
public function rollback()
{
// http://msdn.microsoft.com/en-us/library/cc296176.aspx
if (!$this->resource) {
throw new Exception\RuntimeException('Must be connected before you can rollback.');
}
return sqlsrv_rollback($this->resource);
}
示例9: rollbackTransaction
/**
* Rollbacks started database transaction.
*
* @return void
* @throws \Bitrix\Main\Db\SqlQueryException
*/
public function rollbackTransaction()
{
$this->connectInternal();
sqlsrv_rollback($this->resource);
}
示例10: rollback_trans
function rollback_trans()
{
sqlsrv_rollback($this->conn);
$this->in_trans = false;
}
示例11: rollback
/**
* Rollback changes in a transaction.
* @param string optional savepoint name
* @return void
* @throws Dibi\DriverException
*/
public function rollback($savepoint = NULL)
{
sqlsrv_rollback($this->connection);
}
示例12: _rollBack
/**
* Roll back a transaction and return to autocommit mode.
*
* @return void
* @throws \Zend\Db\Adapter\SqlsrvException
*/
protected function _rollBack()
{
if (!sqlsrv_rollback($this->_connection)) {
throw new SqlsrvException(sqlsrv_errors());
}
}
示例13: verifyGenericQueryRollback
/**
* Execute data manipulation statement, then roll it back
* @param $type
* @param $table
* @param $query
* @return string
*/
protected function verifyGenericQueryRollback($type, $table, $query)
{
$this->log->debug("verifying {$type} statement");
if (!sqlsrv_begin_transaction($this->database)) {
return "Failed to create transaction";
}
$this->query($query, false);
$error = $this->lastError();
sqlsrv_rollback($this->database);
return $error;
}
示例14: dbTransactionRollback
/**
* Rolls back the sql transaction.
*
* @return boolean (Returns TRUE on success or FALSE on failure.)
*/
function dbTransactionRollback()
{
return sqlsrv_rollback(Database::getConnection());
// Rolls back a transaction.
}
示例15: doRollback
/**
* Rollback a transaction.
* No-op on non-transactional databases.
*/
protected function doRollback($fname = __METHOD__)
{
sqlsrv_rollback($this->mConn);
$this->mTrxLevel = 0;
}