当前位置: 首页>>代码示例>>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;未经允许,请勿转载。