本文整理汇总了PHP中ibase_commit函数的典型用法代码示例。如果您正苦于以下问题:PHP ibase_commit函数的具体用法?PHP ibase_commit怎么用?PHP ibase_commit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ibase_commit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: gcms_commit
function gcms_commit()
{
global $gcms_trans_id;
if ($gcms_trans_id) {
ibase_commit($gcms_trans_id);
}
$gcms_trans_id = false;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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 ';
}
}
}
示例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;
}
示例10: transCommit
public function transCommit()
{
return ibase_commit($this->ibase_trans);
}
示例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);
}
示例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);
}
}
示例13: gravaTrasacao
protected function gravaTrasacao($transacao) {
return ibase_commit($transacao);
}
示例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;
}
示例15: _performCommit
function _performCommit()
{
return ibase_commit($this->trans);
}