本文整理汇总了PHP中cubrid_rollback函数的典型用法代码示例。如果您正苦于以下问题:PHP cubrid_rollback函数的具体用法?PHP cubrid_rollback怎么用?PHP cubrid_rollback使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cubrid_rollback函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rollback
/**
* Rollback transaction.
*/
public function rollback()
{
cubrid_rollback($this->link);
if ($this->autoCommit && !cubrid_get_autocommit($this->link)) {
cubrid_set_autocommit($this->link, CUBRID_AUTOCOMMIT_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: transRollback
public function transRollback()
{
cubrid_rollback($this->connect);
if (!cubrid_get_autocommit($this->connect)) {
cubrid_set_autocommit($this->connect, CUBRID_AUTOCOMMIT_TRUE);
}
return TRUE;
}
示例4: cubrid_mysql_rollback
function cubrid_mysql_rollback($link_identifier)
{
return cubrid_rollback($link_identifier);
}
示例5: _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;
}
示例6: _rollback
/**
* DB transaction rollback
* this method is private
* @return boolean
*/
function _rollback($transactionLevel = 0)
{
$connection = $this->_getConnection('master');
$point = $transactionLevel - 1;
if ($point) {
$this->_query("ROLLBACK TO SP" . $point, $connection);
} else {
@cubrid_rollback($connection);
}
return TRUE;
}
示例7: header
<?php
include_once "connect.inc";
header('Content-type: text/html; charset=euc-kr');
//var_dump($connect_url);
$conn = cubrid_connect_with_url($connect_url);
$sql = "SELECT a from foo";
$result = cubrid_execute($conn, $sql);
$pResult = cubrid_fetch($result);
echo $pResult[0];
echo "<br/>";
cubrid_close_request($result);
cubrid_rollback($conn);
cubrid_disconnect($conn);
示例8: cubrid_execute
$is_exist = false;
}
if ($is_exist === false) {
$result = cubrid_execute($dh, "CREATE TABLE \"" . $db["table"] . "\" (\n \"index\" INTEGER NOT NULL,\n \"addr1\" CHARACTER VARYING(12) NOT NULL,\n \"addr2\" CHARACTER VARYING(30) NOT NULL,\n \"addr3\" CHARACTER VARYING(64) NOT NULL,\n \"addr4\" CHARACTER VARYING(24) NOT NULL,\n \"zipcode\" CHARACTER(7) NOT NULL\n );");
if ($result === false) {
printf("DB Error %d (%d): %s\n", cubrid_error_code(), cubrid_error_code_facility(), cubrid_error_msg());
cubrid_rollback($dh);
cubrid_disconnect($dh);
exit(0);
}
cubrid_close_request($result);
cubrid_commit($dh);
$result = cubrid_execute($dh, "CREATE UNIQUE INDEX \"" . $db["table"] . "_idx\"\n ON \"" . $db["table"] . "\" (\"index\" ASC);");
if ($result === false) {
printf("Cannot create index.\n");
cubrid_rollback($dh);
} else {
cubrid_close_request($result);
cubrid_commit($dh);
}
}
$error_count = 0;
$inserted = 0;
foreach ($addr_list as $val) {
$result = cubrid_execute($dh, sprintf("INSERT INTO \"%s\" (\"index\", \"addr1\", \"addr2\",\n \"addr3\", \"addr4\", \"zipcode\") VALUES\n (%d, '%s', '%s', '%s', '%s', '%s');", $db["table"], $val[5], $val[1], $val[2], $val[3], $val[4], $val[0]));
if ($result === false) {
$error_count++;
printf("Insert Error! Index: %d, Error Count: %d\n", $val[5], $error_count);
continue;
}
$inserted++;
示例9: 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");
}
示例10: testCubridCci4
public function testCubridCci4()
{
if (OUTPUT_FUNCTION_NAME == true) {
echo "\r\nRunning: " . __FUNCTION__ . " = ";
}
try {
$table = "t1";
$this->sql = "create table t1(code int unique, s string) ";
cubrid_execute($this->con, $this->sql);
cubrid_commit($this->con);
for ($i = 0; $i < 100; $i++) {
$this->sql = "insert into t1 values({$i}, 'aaa')";
$this->req = cubrid_execute($this->con, $this->sql);
}
cubrid_rollback($this->con);
$this->sql = "select count(*) from t1";
$this->req = cubrid_execute($this->con, $this->sql);
$str = cubrid_fetch_row($this->req);
echo $str[0];
$this->assertEquals($str[0], 0);
echo "\r\n#### case Cci4 OK #### ";
} catch (Exception $e) {
echo "\r\n#### Catch Cci4 Exception #### ";
}
$this->sql = "drop table t1";
cubrid_execute($this->con, $this->sql);
cubrid_commit($this->con);
$this->req = null;
}
示例11: _rollback
/**
* DB transaction rollback
* this method is private
* @return boolean
*/
function _rollback()
{
$connection = $this->_getConnection('master');
@cubrid_rollback($connection);
return TRUE;
}
示例12: rollback
/**
* @brief 롤백
**/
function rollback()
{
if (!$this->isConnected() || !$this->transaction_started) {
return;
}
@cubrid_rollback($this->fd);
$this->transaction_started = false;
}
示例13: 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;
}