本文整理汇总了PHP中cubrid_set_autocommit函数的典型用法代码示例。如果您正苦于以下问题:PHP cubrid_set_autocommit函数的具体用法?PHP cubrid_set_autocommit怎么用?PHP cubrid_set_autocommit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cubrid_set_autocommit函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: transCommit
public function transCommit()
{
cubrid_commit($this->connect);
if (!cubrid_get_autocommit($this->connect)) {
cubrid_set_autocommit($this->connect, CUBRID_AUTOCOMMIT_TRUE);
}
return true;
}
示例2: 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;
}
cubrid_rollback($this->conn_id);
if ($this->auto_commit && !cubrid_get_autocommit($this->conn_id)) {
cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE);
}
return TRUE;
}
示例3: _begin
/**
* DB transaction start
* this method is private
* @return boolean
*/
function _begin($transactionLevel = 0)
{
if (__CUBRID_VERSION__ >= '8.4.0') {
$connection = $this->_getConnection('master');
if (!$transactionLevel) {
cubrid_set_autocommit($connection, CUBRID_AUTOCOMMIT_FALSE);
} else {
$this->_query("SAVEPOINT SP" . $transactionLevel, $connection);
}
}
return TRUE;
}
示例4: _trans_rollback
/**
* Rollback Transaction
*
* @return bool
*/
protected function _trans_rollback()
{
if (!cubrid_rollback($this->conn_id)) {
return FALSE;
}
if ($this->auto_commit && !cubrid_get_autocommit($this->conn_id)) {
cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE);
}
return TRUE;
}
示例5: rollback
/**
* Rollback transaction.
*
* @return void
*/
public function rollback()
{
cubrid_rollback($this->link);
if ($this->autoCommit && !cubrid_get_autocommit($this->link)) {
cubrid_set_autocommit($this->link, CUBRID_AUTOCOMMIT_TRUE);
}
}
示例6: rollbackTrans
public function rollbackTrans()
{
cubrid_rollback($this->_conn);
$this->_transMode = false;
$this->_transFailedCnt = 0;
cubrid_set_autocommit($this->_conn, CUBRID_AUTOCOMMIT_TRUE);
$this->Logging("++ RollbackTrans");
}
示例7: sql_connect_db
function sql_connect_db($server, $username, $password, $database = null, $new_link = false)
{
if ($new_link !== true) {
$new_link = false;
}
if ($database === null) {
return true;
}
if ($database !== null) {
$myport = "30000";
$hostex = explode(":", $server);
if (isset($hostex[1]) && !is_numeric($hostex[1])) {
$hostex[1] = $myport;
}
if (isset($hostex[1])) {
$server = $hostex[0];
$myport = $hostex[1];
}
$link = cubrid_connect($server, $myport, $database, $username, $password);
cubrid_set_autocommit($link, CUBRID_AUTOCOMMIT_TRUE);
}
if ($link === false) {
output_error("Not connected: " . $sqliteerror, E_USER_ERROR);
return false;
}
return $link;
}
示例8: _begin
/**
* DB transaction start
* this method is private
* @return boolean
*/
function _begin()
{
if (__CUBRID_VERSION__ >= '8.4.0') {
$connection = $this->_getConnection('master');
cubrid_set_autocommit($connection, CUBRID_AUTOCOMMIT_FALSE);
}
return TRUE;
}
示例9: trans_rollback
function trans_rollback()
{
if (!$this->trans_enabled) {
return TRUE;
}
if ($this->_trans_depth > 0) {
return TRUE;
}
cubrid_rollback($this->conn_id);
if ($this->auto_commit && !cubrid_get_autocommit($this->conn_id)) {
cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE);
}
return TRUE;
}