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


PHP ibase_trans函数代码示例

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


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

示例1: _performTransaction

 function _performTransaction($parameters = null)
 {
     if ($parameters === null) {
         $parameters = $this->bestTrans;
     }
     $this->trans = ibase_trans($parameters, $this->link);
 }
开发者ID:space77,项目名称:mwfv3_sp,代码行数:7,代码来源:Ibase.php

示例2: gcms_trans

function gcms_trans()
{
    global $fbdb, $gcms_trans_id;
    if (!$gcms_trans_id) {
        $gcms_trans_id = ibase_trans(IBASE_COMMITTED, $fbdb);
    }
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:7,代码来源:firebird.php

示例3: _performTransaction

 function _performTransaction($parameters = null)
 {
     if ($parameters === null) {
         $parameters = $this->DbSimple_Ibase_BEST_TRANSACTION;
     }
     $this->trans = @ibase_trans($parameters, $this->link);
 }
开发者ID:saqar,项目名称:tc_aowow,代码行数:7,代码来源:Ibase.php

示例4: BeginTrans

	public function BeginTrans()
	{	 
		if ($this->transOff) return true;
		$this->transCnt += 1;
		$this->autoCommit = false;
	 	$this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);
		return $this->_transactionID;
	}
开发者ID:joeymetal,项目名称:v1,代码行数:8,代码来源:adodb-borland_ibase.inc.php

示例5: begin_transaction

 /**
  * This function begins a transaction.
  *
  * @access public
  * @override
  * @throws Throwable_SQL_Exception              indicates that the executed
  *                                              statement failed
  */
 public function begin_transaction()
 {
     if (!$this->is_connected()) {
         throw new Throwable_SQL_Exception('Message: Failed to begin SQL transaction. Reason: Unable to find connection.');
     }
     $command = @ibase_trans($this->resource, IBASE_READ | IBASE_WRITE);
     if ($command === FALSE) {
         throw new Throwable_SQL_Exception('Message: Failed to begin SQL transaction. Reason: :reason', array(':reason' => @ibase_errmsg()));
     }
     $this->sql = 'BEGIN TRANSACTION;';
 }
开发者ID:ruslankus,项目名称:invoice-crm,代码行数:19,代码来源:Standard.php

示例6: begin

 public function begin($isolationLevel = null)
 {
     if ($isolationLevel === null) {
         $this->isolationLevel = IBASE_WRITE | IBASE_COMMITTED | IBASE_REC_NO_VERSION | IBASE_WAIT;
     } else {
         $this->setTransactionIsolationLevel($isolationLevel);
     }
     $this->autoCommit = false;
     $this->connection = ibase_trans($this->isolationLevel, $this->connection);
     return $this->connection;
 }
开发者ID:reoring,项目名称:sabel,代码行数:11,代码来源:Driver.php

示例7: begin

 /**
  * Begins a transaction (if supported).
  * @param  string  optional savepoint name
  * @return void
  * @throws DibiDriverException
  */
 public function begin($savepoint = NULL)
 {
     if ($savepoint !== NULL) {
         throw new DibiNotSupportedException('Savepoints are not supported in Firebird/Interbase.');
     }
     $this->transaction = ibase_trans($this->resource);
     $this->inTransaction = TRUE;
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:14,代码来源:DibiFirebirdDriver.php

示例8: _quoteLOB

 /**
  * Convert a text value into a DBMS specific format that is suitable to
  * compose query statements.
  *
  * @param resource  $prepared_query query handle from prepare()
  * @param           $parameter
  * @param           $lob
  * @return string text string that represents the given argument value in
  *      a DBMS specific format.
  * @access private
  */
 function _quoteLOB($lob)
 {
     $db =& $GLOBALS['_MDB2_databases'][$this->db_index];
     if (MDB2::isError($connect = $db->connect())) {
         return $connect;
     }
     $prepared_query = $GLOBALS['_MDB2_LOBs'][$lob]->prepared_query;
     $parameter = $GLOBALS['_MDB2_LOBs'][$lob]->parameter;
     $value = '';
     // DEAL WITH ME
     if (!($db->transaction_id = @ibase_trans(IBASE_COMMITTED, $db->connection))) {
         return $db->raiseError(MDB2_ERROR, null, null, 'Could not start a new transaction: ' . ibase_errmsg());
     }
     if ($lo = @ibase_blob_create($db->auto_commit ? $db->connection : $db->transaction_id)) {
         while (!$this->endOfLOB($lob)) {
             $result = $this->readLOB($lob, $data, $db->options['lob_buffer_length']);
             if (MDB2::isError($result)) {
                 break;
             }
             if (@ibase_blob_add($lo, $data) === false) {
                 $result = $db->raiseError(MDB2_ERROR, null, null, 'Could not add data to a large object: ' . ibase_errmsg());
                 break;
             }
         }
         if (MDB2::isError($result)) {
             @ibase_blob_cancel($lo);
         } else {
             $value = @ibase_blob_close($lo);
         }
     } else {
         $result = $db->raiseError();
     }
     if (!isset($db->query_parameters[$prepared_query])) {
         $db->query_parameters[$prepared_query] = array(0, '');
         $db->query_parameter_values[$prepared_query] = array();
     }
     $query_parameter = count($db->query_parameters[$prepared_query]);
     $db->query_parameters[$prepared_query][$query_parameter] = $value;
     $db->query_parameter_values[$prepared_query][$parameter] = $query_parameter;
     $value = '?';
     if (!$db->auto_commit) {
         $db->commit();
     }
     return $value;
 }
开发者ID:BackupTheBerlios,项目名称:smart-svn,代码行数:56,代码来源:ibase.php

示例9: begin

 /**
  * @see ILumine_Connection::begin()
  */
 public function begin($transactionID = null)
 {
     $id = $this->transactions_count++;
     $this->transactions[$id] = ibase_trans(IBASE_DEFAULT, $this->conn_id);
     return $id;
 }
开发者ID:rrmoura1,项目名称:Abstergo,代码行数:9,代码来源:Firebird.php

示例10: _beginTransaction

 /**
  * Begin a transaction.
  *
  * @return void
  */
 protected function _beginTransaction()
 {
     $this->_connect();
     if (is_resource($this->_transResource)) {
         return;
     }
     $this->_transResource = ibase_trans(IBASE_DEFAULT, $this->_connection);
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:13,代码来源:Firebird.php

示例11: rollback

 /**
  * Cancel any database changes done during a transaction that is in
  * progress. This function may only be called when auto-committing is
  * disabled, otherwise it will fail. Therefore, a new transaction is
  * implicitly started after canceling the pending changes.
  *
  * @return mixed MDB2_OK on success, a MDB2 error on failure
  * @access public
  */
 function rollback()
 {
     $this->debug('rolling back transaction', 'rollback');
     if ($this->auto_commit) {
         return $this->raiseError(MDB2_ERROR, null, null, 'rollback: transactions can not be rolled back when changes are auto commited');
     }
     if ($this->transaction_id && !@ibase_rollback($this->connection)) {
         return $this->raiseError(MDB2_ERROR, null, null, 'rollback: Could not rollback a pending transaction: ' . ibase_errmsg());
     }
     if (!($this->transaction_id = @ibase_trans(IBASE_COMMITTED, $this->connection))) {
         return $this->raiseError(MDB2_ERROR, null, null, 'rollback: Could not start a new transaction: ' . ibase_errmsg());
     }
     return MDB2_OK;
 }
开发者ID:GeekyNinja,项目名称:LifesavingCAD,代码行数:23,代码来源:ibase.php

示例12: Transaction

 function Transaction($intQuery)
 {
     if ($this->intDebug) {
         echo "Use transaction...\t\t<br>";
     }
     $this->intTrans = ibase_trans($this->intConn);
     $this->intTranStatus = 0;
     return $this->intTrans;
 }
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:9,代码来源:metafire.lib.php

示例13: _trans_begin

 /**
  * Begin Transaction.
  *
  * @return bool
  */
 protected function _trans_begin()
 {
     if (($trans_handle = ibase_trans($this->conn_id)) === false) {
         return false;
     }
     $this->_ibase_trans = $trans_handle;
     return true;
 }
开发者ID:recca0120,项目名称:laraigniter,代码行数:13,代码来源:ibase_driver.php

示例14: trans_begin

 /**
  * Begin Transaction
  *
  * @param	bool	$test_mode
  * @return	bool
  */
 public function trans_begin($test_mode = FALSE)
 {
     // When transactions are nested we only begin/commit/rollback the outermost ones
     if (!$this->trans_enabled or $this->_trans_depth > 0) {
         return TRUE;
     }
     // Reset the transaction failure flag.
     // If the $test_mode flag is set to TRUE transactions will be rolled back
     // even if the queries produce a successful result.
     $this->_trans_failure = $test_mode === TRUE;
     $this->_ibase_trans = ibase_trans($this->conn_id);
     return TRUE;
 }
开发者ID:alyayazilim,项目名称:E-Ticaret-2015,代码行数:19,代码来源:ibase_driver.php

示例15: trans

 function trans($action, $transID = null)
 {
     //action = begin, commit oder rollback
     if ($action == 'begin') {
         $this->transID = ibase_trans($this->linkId);
         return $this->transID;
     }
     if ($action == 'commit' and !empty($this->transID)) {
         ibase_commit($this->linkId, $this->transID);
     }
     if ($action == 'rollback') {
         ibase_rollback($this->linkId, $this->transID);
     }
 }
开发者ID:shoaibali,项目名称:ispconfig3,代码行数:14,代码来源:db_firebird.inc.php


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