本文整理汇总了PHP中ibase_commit函数的典型用法代码示例。如果您正苦于以下问题:PHP ibase_commit函数的具体用法?PHP ibase_commit怎么用?PHP ibase_commit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ibase_commit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute($sql, $bindParams = array(), $additionalParameters = array())
{
$connection = $this->connection;
if (empty($bindParams)) {
$result = ibase_query($connection, $sql);
} else {
$holderRegex = "/@[a-zA-Z0-9_]+@/";
preg_match_all($holderRegex, $sql, $matches);
$args = array($connection, preg_replace($holderRegex, "?", $sql));
foreach ($matches[0] as $holder) {
$args[] = $bindParams[$holder];
}
$result = call_user_func_array("ibase_query", $args);
}
if (!$result) {
$this->executeError($sql);
}
$rows = array();
if (is_resource($result)) {
while ($row = ibase_fetch_assoc($result, IBASE_TEXT)) {
$rows[] = array_change_key_case($row);
}
ibase_free_result($result);
} else {
$this->affectedRows = $result === true ? 0 : $result;
}
if ($this->autoCommit) {
ibase_commit($connection);
}
return empty($rows) ? null : $rows;
}
开发者ID:reoring,项目名称:sabel,代码行数:31,代码来源:Driver.php
示例2: gcms_commit
function gcms_commit()
{
global $gcms_trans_id;
if ($gcms_trans_id) {
ibase_commit($gcms_trans_id);
}
$gcms_trans_id = false;
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:8,代码来源:firebird.php
示例3: _sql_transaction
/**
* SQL Transaction
* @access private
*/
function _sql_transaction($status = 'begin')
{
switch ($status) {
case 'begin':
return true;
break;
case 'commit':
return @ibase_commit();
break;
case 'rollback':
return @ibase_rollback();
break;
}
return true;
}
开发者ID:BACKUPLIB,项目名称:mwenhanced,代码行数:19,代码来源:firebird.php
示例4: CommitTransaction
function CommitTransaction($intTrans)
{
if ($this->intDebug) {
echo "Committing transaction...\t\t<br>";
}
$this->intTrans = ibase_commit($this->intTrans);
$this->intTransStatus++;
return $this->intQuery;
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:9,代码来源:metafire.lib.php
示例5: commit
/**
* Commits the current transaction
*
* @return int DB_OK on success. A DB_Error object on failure.
*/
function commit()
{
return @ibase_commit($this->connection);
}
开发者ID:ryo88c,项目名称:BEAR.Saturday,代码行数:9,代码来源:ibase.php
示例6: trans_commit
/**
* Commit Transaction
*
* @return bool
*/
public function trans_commit()
{
// When transactions are nested we only begin/commit/rollback the outermost ones
if (!$this->trans_enabled or $this->_trans->depth > 0) {
return TRUE;
}
return ibase_commit($this->_ibase_trans);
}
开发者ID:alyayazilim,项目名称:E-Ticaret-2015,代码行数:13,代码来源:ibase_driver.php
示例7: commit
/**
+----------------------------------------------------------
* 用于非自动提交状态下面的查询提交
+----------------------------------------------------------
* @access public
+----------------------------------------------------------
* @return boolen
+----------------------------------------------------------
* @throws ThinkExecption
+----------------------------------------------------------
*/
public function commit()
{
if ($this->transTimes > 0) {
$result = ibase_commit($this->_linkID);
$this->transTimes = 0;
if (!$result) {
throw_exception($this->error());
}
}
return true;
}
开发者ID:dalinhuang,项目名称:concourse,代码行数:22,代码来源:DbIbase.class.php
示例8: array
if ($_REQUEST['spt'] == '') {
$exception = array('spt_id', 'nama_kegiatan');
$other_request = array('pendataan_id' => $ID_HEADER, 'pendataan_no' => $no_spt, 'jenis_pendataan' => 'LISTRIK');
} else {
$exception = array('nama_kegiatan');
$other_request = array('pendataan_id' => $ID_HEADER, 'pendataan_no' => $no_spt, 'jenis_pendataan' => 'LISTRIK', 'spt_id' => $_REQUEST['spt']);
}
ibase_trans();
$a = $fbird->FBInsert('pendataan_spt', $other_request, $exception);
unset($exception);
unset($other_request);
if ($a) {
$ID_CONTENT = $fbird->setGenerator('GEN_PENDATAAN_LISTRIK');
$exception = array();
$other_request = array('listrik_id' => $ID_CONTENT, 'pendataan_id' => $ID_HEADER, 'id_rekening' => $_REQUEST['rekening']);
$b = $fbird->FBInsert('pendataan_listrik', $other_request, $exception);
unset($exception);
unset($other_request);
if ($b) {
ibase_commit();
echo 'Data Telah Tersimpan';
} else {
ibase_rollback();
echo 'Gagal Di Content';
}
} else {
ibase_rollback();
echo 'Gagal d Header ';
}
}
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:31,代码来源:pendataan_listrik.asyc.php
示例9: commit
/**
* 用于非自动提交状态下面的查询提交
* @access public
* @return boolen
*/
public function commit()
{
if ($this->transTimes > 0) {
$result = ibase_commit($this->_linkID);
$this->transTimes = 0;
if (!$result) {
$this->error();
return false;
}
}
return true;
}
开发者ID:szwork2013,项目名称:distribution,代码行数:17,代码来源:DbIbase.class.php
示例10: transCommit
public function transCommit()
{
return ibase_commit($this->ibase_trans);
}
开发者ID:bytemtek,项目名称:znframework,代码行数:4,代码来源:Ibase.php
示例11: do_dellfolderno
function do_dellfolderno($folderno)
{
// if (!isOwner(m_quotes($filderno), $_SESSION["clientcode"])) return false;
$conn = db_connect();
$tsql = "select * from n_dellfolderno('" . $folderno . "')";
$stmt = ibase_query($conn, $tsql);
if ($stmt === false) {
echo "Error in executing query.<br/>";
die(0);
}
ibase_fetch_row($stmt);
ibase_free_result($stmt);
ibase_commit();
ibase_close($conn);
}
开发者ID:KhasanOrsaev,项目名称:work_nacpp,代码行数:15,代码来源:JsonFuncController.php
示例12: 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
示例13: gravaTrasacao
protected function gravaTrasacao($transacao) {
return ibase_commit($transacao);
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:3,代码来源:modelConexao.php
示例14: commit
/**
* Envoie une commande COMMIT à la base de données pour validation de la
* transaction courante
*
* @access public
* @return boolean
*/
function commit()
{
if (!($result = ibase_commit($this->link))) {
ibase_rollback($this->link);
}
$this->autocommit = true;
return $result;
}
开发者ID:bibwho,项目名称:MATPbootstrap,代码行数:15,代码来源:firebird.php
示例15: _performCommit
function _performCommit()
{
return ibase_commit($this->trans);
}
开发者ID:space77,项目名称:mwfv3_sp,代码行数:4,代码来源:Ibase.php
示例16: commit
/**
* Commit the 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 committing the pending changes.
*
* @return mixed MDB_OK on success, a MDB error on failure
* @access public
*/
function commit()
{
$this->debug('Commit Transaction');
if ($this->auto_commit) {
return $this->raiseError(MDB_ERROR, NULL, NULL, 'Commit: transaction changes are being auto commited');
}
return @ibase_commit($this->connection);
}
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:17,代码来源:ibase.php
示例17: commit
/**
* This function commits a transaction.
*
* @access public
* @override
* @throws Throwable_SQL_Exception indicates that the executed
* statement failed
*/
public function commit()
{
if (!$this->is_connected()) {
throw new Throwable_SQL_Exception('Message: Failed to commit SQL transaction. Reason: Unable to find connection.');
}
$command = @ibase_commit($this->resource);
if ($command === FALSE) {
throw new Throwable_SQL_Exception('Message: Failed to commit SQL transaction. Reason: :reason', array(':reason' => @ibase_errmsg()));
}
$this->sql = 'COMMIT;';
}
开发者ID:ruslankus,项目名称:invoice-crm,代码行数:19,代码来源:Standard.php
示例18: trans_commit
/**
* Commit Transaction
*
* @access public
* @return bool
*/
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 @ibase_commit();
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:17,代码来源:ibase_driver.php
示例19: commit
/**
* Commits statements in a transaction.
* @param string optional savepoint name
* @return void
* @throws DibiDriverException
*/
public function commit($savepoint = NULL)
{
if ($savepoint !== NULL) {
throw new DibiNotSupportedException('Savepoints are not supported in Firebird/Interbase.');
}
if (!ibase_commit($this->transaction)) {
throw new DibiDriverException('Unable to handle operation - failure when commiting transaction.');
}
$this->inTransaction = FALSE;
}
开发者ID:floffel03,项目名称:pydio-core,代码行数:16,代码来源:DibiFirebirdDriver.php
示例20: commit
/**
* Commit the database changes done during a transaction that is in
* progress or release a savepoint. This function may only be called when
* auto-committing is disabled, otherwise it will fail. Therefore, a new
* transaction is implicitly started after committing the pending changes.
*
* @param string name of a savepoint to release
* @return mixed MDB2_OK on success, a MDB2 error on failure
*
* @access public
*/
function commit($savepoint = null)
{
$this->debug('Committing transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint));
if (!$this->in_transaction) {
return $this->raiseError(MDB2_ERROR_INVALID, null, null, 'commit/release savepoint cannot be done changes are auto committed', __FUNCTION__);
}
if (null !== $savepoint) {
$query = 'RELEASE SAVEPOINT ' . $savepoint;
return $this->_doQuery($query, true);
}
if (!@ibase_commit($this->transaction_id)) {
return $this->raiseError(null, null, null, 'could not commit a transaction', __FUNCTION__);
}
$this->in_transaction = false;
$this->transaction_id = 0;
return MDB2_OK;
}
开发者ID:Dulciane,项目名称:jaws,代码行数:28,代码来源:ibase.php
注:本文中的ibase_commit函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论