當前位置: 首頁>>代碼示例>>PHP>>正文


PHP sqlsrv_rollback函數代碼示例

本文整理匯總了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.");
     }
 }
開發者ID:helpfulrobot,項目名稱:silverstripe-mssql,代碼行數:12,代碼來源:SQLServerConnector.php

示例2: rollbackTransaction

 public function rollbackTransaction()
 {
     if ($this->transactionOn) {
         //$this->execute('ROLLBACK TRANSACTION');
         sqlsrv_rollback($this->connection);
         $this->transactionOn = false;
     }
 }
開發者ID:fkali,項目名稱:yupp,代碼行數:8,代碼來源:core.db.DatabaseSQLServer.class.php

示例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);
 }
開發者ID:pepegarcia,項目名稱:publicidadoficialdemo-1,代碼行數:10,代碼來源:sqlsrv_driver.php

示例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;
 }
開發者ID:zqstudio2015,項目名稱:myweiphp,代碼行數:17,代碼來源:Sqlsrv.class.php

示例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());
     }
 }
開發者ID:Simarpreet05,項目名稱:joomla,代碼行數:13,代碼來源:Sqlsrv.php

示例6: rollback_transaction

 public function rollback_transaction()
 {
     sqlsrv_rollback($this->connection);
 }
開發者ID:rokkit,項目名稱:temp,代碼行數:4,代碼來源:db_sqlsrv.php

示例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);
 }
開發者ID:pmward,項目名稱:Codeigniter-Braintree-v.zero-test-harness,代碼行數:17,代碼來源:sqlsrv_driver.php

示例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);
 }
開發者ID:liuxuezhan,項目名稱:my_tool,代碼行數:11,代碼來源:Connection.php

示例9: rollbackTransaction

 /**
  * Rollbacks started database transaction.
  *
  * @return void
  * @throws \Bitrix\Main\Db\SqlQueryException
  */
 public function rollbackTransaction()
 {
     $this->connectInternal();
     sqlsrv_rollback($this->resource);
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:11,代碼來源:mssqlconnection.php

示例10: rollback_trans

 function rollback_trans()
 {
     sqlsrv_rollback($this->conn);
     $this->in_trans = false;
 }
開發者ID:alucard263096,項目名稱:AMK,代碼行數:5,代碼來源:sqlsrv.cls.php

示例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);
 }
開發者ID:janlanger,項目名稱:dibi,代碼行數:10,代碼來源:SqlsrvDriver.php

示例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());
     }
 }
開發者ID:heiglandreas,項目名稱:zf2,代碼行數:12,代碼來源:Sqlsrv.php

示例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;
 }
開發者ID:netconstructor,項目名稱:sugarcrm_dev,代碼行數:18,代碼來源:SqlsrvManager.php

示例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.
 }
開發者ID:beingsane,項目名稱:BusinessEntity,代碼行數:10,代碼來源:BaseDB.class.php

示例15: doRollback

 /**
  * Rollback a transaction.
  * No-op on non-transactional databases.
  */
 protected function doRollback($fname = __METHOD__)
 {
     sqlsrv_rollback($this->mConn);
     $this->mTrxLevel = 0;
 }
開發者ID:biribogos,項目名稱:wikihow-src,代碼行數:9,代碼來源:DatabaseMssql.php


注:本文中的sqlsrv_rollback函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。