当前位置: 首页>>代码示例>>PHP>>正文


PHP sqlsrv_commit函数代码示例

本文整理汇总了PHP中sqlsrv_commit函数的典型用法代码示例。如果您正苦于以下问题:PHP sqlsrv_commit函数的具体用法?PHP sqlsrv_commit怎么用?PHP sqlsrv_commit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sqlsrv_commit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: transactionEnd

 /**
  * Commit everything inside this transaction so far
  */
 public function transactionEnd()
 {
     $result = sqlsrv_commit($this->dbConn);
     if (!$result) {
         $this->databaseError("Couldn't commit the transaction.");
     }
 }
开发者ID:helpfulrobot,项目名称:silverstripe-mssql,代码行数:10,代码来源:SQLServerConnector.php

示例2: commitTransaction

 public function commitTransaction()
 {
     if ($this->transactionOn) {
         //$this->execute('COMMIT TRANSACTION');
         sqlsrv_commit($this->connection);
         $this->transactionOn = false;
     }
 }
开发者ID:fkali,项目名称:yupp,代码行数:8,代码来源:core.db.DatabaseSQLServer.class.php

示例3: trans_commit

 function trans_commit()
 {
     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_commit($this->conn_id);
 }
开发者ID:pepegarcia,项目名称:publicidadoficialdemo-1,代码行数:11,代码来源:sqlsrv_driver.php

示例4: _sql_transaction

 /**
  * SQL Transaction
  * @access private
  */
 function _sql_transaction($status = 'begin')
 {
     switch ($status) {
         case 'begin':
             return sqlsrv_begin_transaction($this->db_connect_id);
             break;
         case 'commit':
             return sqlsrv_commit($this->db_connect_id);
             break;
         case 'rollback':
             return sqlsrv_rollback($this->db_connect_id);
             break;
     }
     return true;
 }
开发者ID:MrAdder,项目名称:phpbb,代码行数:19,代码来源:mssqlnative.php

示例5: commit

 /**
  * 用于非自动提交状态下面的查询提交
  * @access public
  * @return boolean
  */
 public function commit()
 {
     if ($this->transTimes > 0) {
         $result = sqlsrv_commit($this->_linkID);
         $this->transTimes = 0;
         if (!$result) {
             $this->error();
             return false;
         }
     }
     return true;
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:17,代码来源:Sqlsrv.class.php

示例6: _commit

 /**
  * Commit a transaction and return to autocommit mode.
  *
  * @return void
  * @throws Zend_Db_Adapter_Sqlsrv_Exception
  */
 protected function _commit()
 {
     if (!sqlsrv_commit($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

示例7: commit_transaction

 public function commit_transaction()
 {
     sqlsrv_commit($this->connection);
 }
开发者ID:rokkit,项目名称:temp,代码行数:4,代码来源:db_sqlsrv.php

示例8: _commit

 protected function _commit()
 {
     return sqlsrv_commit($this->handle);
 }
开发者ID:codifyllc,项目名称:phpopenfw,代码行数:4,代码来源:dt_sqlsrv.class.php

示例9: commit

 /**
  * @brief 커밋
  **/
 function commit($force = false)
 {
     if (!$force && ($this->is_connected == false || !$this->transaction_started)) {
         return;
     }
     $this->transaction_started = false;
     sqlsrv_commit($this->conn);
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:11,代码来源:DBMssql.class.php

示例10: commit_transaction

 /**
  * Driver specific commit of real database transaction,
  * this can not be used directly in code.
  * @return void
  */
 protected function commit_transaction()
 {
     $this->query_start('native sqlsrv_commit', NULL, SQL_QUERY_AUX);
     $result = sqlsrv_commit($this->sqlsrv);
     $this->query_end($result);
 }
开发者ID:mongo0se,项目名称:moodle,代码行数:11,代码来源:sqlsrv_native_moodle_database.php

示例11: get_booking_info

 /*if ($notify_by_email)
   {
     require_once "functions_mail.inc";
     // Gather all fields values for use in emails.
     $mail_previous = get_booking_info($id, FALSE);
     // If this is an individual entry of a series then force the entry_type
     // to be a changed entry, so that when we create the iCalendar object we know that
     // we only want to delete the individual entry
     if (!$series && ($mail_previous['rep_type'] != REP_NONE))
     {
       $mail_previous['entry_type'] = ENTRY_RPT_CHANGED;
     }
   }*/
 sqlsrv_begin_transaction($conn);
 $start_times = mrbsDelEntry('test', $id, $series, 1);
 sqlsrv_commit($conn);
 // [At the moment MRBS does not inform the user if it was not able to delete
 // an entry, or, for a series, some entries in a series.  This could happen for
 // example if a booking policy is in force that prevents the deletion of entries
 // in the past.   It would be better to inform the user that the operation has
 // been unsuccessful or only partially successful]
 if ($start_times !== FALSE && count($start_times) > 0) {
     // Send a mail to the Administrator
     if ($notify_by_email) {
         // Now that we've finished with mrbsDelEntry, change the id so that it's
         // the repeat_id if we're looking at a series.   (This is a complete hack,
         // but brings us back into line with the rest of MRBS until the anomaly
         // of del_entry is fixed)
         if ($series) {
             $mail_previous['id'] = $mail_previous['repeat_id'];
         }
开发者ID:cvelayo,项目名称:worklog,代码行数:31,代码来源:del_entry.php

示例12: commit

 /**
  * Commits statements in a transaction.
  * @param  string  optional savepoint name
  * @return void
  * @throws Dibi\DriverException
  */
 public function commit($savepoint = NULL)
 {
     sqlsrv_commit($this->connection);
 }
开发者ID:janlanger,项目名称:dibi,代码行数:10,代码来源:SqlsrvDriver.php

示例13: _commit

 /**
  * Commit a transaction and return to autocommit mode.
  *
  * @return void
  * @throws \Zend\Db\Adapter\SqlsrvException
  */
 protected function _commit()
 {
     if (!sqlsrv_commit($this->_connection)) {
         throw new SqlsrvException(sqlsrv_errors());
     }
 }
开发者ID:heiglandreas,项目名称:zf2,代码行数:12,代码来源:Sqlsrv.php

示例14: transact

 /**
  * Call this function to perform any of the following operation - INSERT, UPDATE, DELETE, READ
  * @param unknown $fieldValueArray - Associative Array
  * array(
  *				'Table'=> 'TableName',						//Mandatory
  *				'Fields'=> array(							//Mandatory
  *				'FieldName1' =>Value1,
  *				'FieldName2' =>Value2,
  *				'FieldName_n'=>Value_n
  *				)	
  *			)
  * @param unknown $operation - Type of operation : INSERT,UPDATE,DELETE,READ,INSERT_MR
  * @param unknown $outputFormat - Values possible : ASSOC | NUM_ARR | NUM_ROWS . Optional parameter
  */
 private function transact($fieldValueArray, $operation, $outputFormat = 'ASSOC')
 {
     $operation = strtoupper($operation);
     $transactReturnCode = -1;
     // Transaction Failed
     $read = false;
     switch ($operation) {
         case 'INSERT':
             $Query = $this->Prepare_Query($fieldValueArray, 'INSERT');
             break;
         case 'UPDATE':
             $Query = $this->Prepare_Query($fieldValueArray, 'UPDATE');
             break;
         case 'DELETE':
             $Query = $this->Prepare_Query($fieldValueArray, 'DELETE');
             break;
         case 'READ':
             $Query = $this->Prepare_Query($fieldValueArray, 'READ');
             $s = sqlsrv_query($this->dbconnection, $Query);
             $output = $this->Prepare_Output($s, $outputFormat);
             $transactReturnCode = $output;
             sqlsrv_free_stmt($s);
             $read = true;
             break;
         case 'INSERT_MR':
             $tableName = $fieldValueArray['TABLE_NAME'];
             $listOfID = $fieldValueArray['ID_LIST'];
             $FieldsArray = $fieldValueArray['FIELD_DETAILS'];
             $input_array = array('FIELD_ARRAY' => $FieldsArray, 'TABLE_NAME' => $tableName);
             $Query = $this->Prepare_Query($fieldValueArray, 'INSERT_MR');
             break;
     }
     if (!$read && sqlsrv_begin_transaction($this->dbconnection)) {
         $s = sqlsrv_query($this->dbconnection, $Query);
         if ($s) {
             sqlsrv_commit($this->dbconnection);
             $transactReturnCode = 0;
             // Transaction Success
         }
     }
     return $transactReturnCode;
 }
开发者ID:suhailgupta03,项目名称:cosmo-immigration,代码行数:56,代码来源:SSRV.php

示例15: dbTransactionCommit

 /**
  * Commits the sql transaction.
  *
  * @return boolean (Returns TRUE on success or FALSE on failure.)
  */
 function dbTransactionCommit()
 {
     return sqlsrv_commit(Database::getConnection());
     // Commits a transaction.
 }
开发者ID:beingsane,项目名称:BusinessEntity,代码行数:10,代码来源:BaseDB.class.php


注:本文中的sqlsrv_commit函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。