本文整理汇总了PHP中cubrid_commit函数的典型用法代码示例。如果您正苦于以下问题:PHP cubrid_commit函数的具体用法?PHP cubrid_commit怎么用?PHP cubrid_commit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cubrid_commit函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: commit
/**
* Commit transaction.
*
* @return void
*/
public function commit()
{
cubrid_commit($this->link);
if ($this->autoCommit && !cubrid_get_autocommit($this->link)) {
cubrid_set_autocommit($this->link, CUBRID_AUTOCOMMIT_TRUE);
}
}
示例2: trans_commit
function trans_commit()
{
if (!$this->trans_enabled) {
return TRUE;
}
if ($this->_trans_depth > 0) {
return TRUE;
}
cubrid_commit($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: 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;
}
cubrid_commit($this->conn_id);
if ($this->auto_commit && !cubrid_get_autocommit($this->conn_id)) {
cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE);
}
return TRUE;
}
示例4: transCommit
public function transCommit()
{
cubrid_commit($this->connect);
if (!cubrid_get_autocommit($this->connect)) {
cubrid_set_autocommit($this->connect, CUBRID_AUTOCOMMIT_TRUE);
}
return true;
}
示例5: cubrid_mysql_commit
function cubrid_mysql_commit($link_identifier)
{
return cubrid_commit($link_identifier);
}
示例6: _trans_commit
/**
* Commit Transaction
*
* @return bool
*/
protected function _trans_commit()
{
if (!cubrid_commit($this->conn_id)) {
return FALSE;
}
if ($this->auto_commit && !cubrid_get_autocommit($this->conn_id)) {
return cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE);
}
return TRUE;
}
示例7: exit
exit(1);
}
$retval = check_table_existence($conn, "largetable");
if ($retval == -1) {
exit(1);
} elseif ($retval == 1) {
printf("this table is created\n");
} else {
printf("#####start: create largetable#####\n");
$cubrid_req = cubrid_execute($conn, "CREATE TABLE largetable(a int AUTO_INCREMENT, b clob)");
if (!$cubrid_req) {
printf("Failed to create test table: [%d] %s\n", cubrid_error_code(), cubrid_error_msg());
exit(1);
}
$req = cubrid_prepare($conn, "insert into largetable(b) values (?)");
$importName = array("largeFile/large.txt");
for ($i = 0; $i < count($importName); $i++) {
$lob = cubrid_lob2_new($conn, "CLOB");
cubrid_lob2_import($lob, $importName[$i]);
cubrid_lob2_bind($req, 1, $lob, "CLOB");
cubrid_execute($req);
cubrid_lob2_close($lob);
}
cubrid_close_prepare($req);
if (!cubrid_commit($conn)) {
exit(1);
}
}
?>
示例8: commit
public static function commit()
{
@cubrid_commit(self::$dbProperties['handle']);
}
示例9: _commit
/**
* DB transaction commit
* this method is private
* @return boolean
*/
function _commit()
{
$connection = $this->_getConnection('master');
@cubrid_commit($connection);
return TRUE;
}
示例10: exit
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++;
if ($inserted % 1000 === 0) {
printf("%d record inserted.\n", $inserted);
}
cubrid_close_request($result);
}
cubrid_commit($dh);
cubrid_disconnect($dh);
printf("Done. %d record inserted, %d errors.\n", $inserted, $error_count);
示例11: commitTrans
public function commitTrans($bCommit = true)
{
if ($bCommit) {
cubrid_commit($this->_conn);
} else {
cubrid_rollback($this->_conn);
}
$this->_transMode = false;
$this->_transFailedCnt = 0;
cubrid_set_autocommit($this->_conn, CUBRID_AUTOCOMMIT_TRUE);
$this->Logging("++ CommitTrans");
}
示例12: header
<?php
include "connect.inc";
header('Content-type: text/html; charset=euc-kr');
$conn = cubrid_connect($host, $port, $db, "dba", $passwd);
$sql = "insert into cubridsus9278(b) values('aaaa')";
$i = 0;
while ($i < 300) {
$result = cubrid_execute($conn, $sql);
if ($result == true) {
cubrid_commit($conn);
} else {
cubrid_rollback($conn);
}
$i++;
}
示例13: testCubridCci6_t10
public function testCubridCci6_t10()
{
// case : ac on
// multi_connection tname?
if (OUTPUT_FUNCTION_NAME == true) {
echo "\r\nRunning: " . __FUNCTION__ . " = ";
}
try {
$this->sql = "create table t10(code int unique, s string) ";
cubrid_execute($this->con, $this->sql);
for ($count = 0; $count < 10; $count++) {
$this->sql = "delete from t10 ";
cubrid_execute($this->con, $this->sql);
cubrid_commit($this->con);
for ($i = 0; $i < 1000; $i++) {
$this->sql = "insert into t10 values({$i}, 'aaa')";
$this->req = cubrid_execute($this->con, $this->sql);
}
$this->sql = "select count(*) from t10";
$this->req = cubrid_execute($this->con, $this->sql);
$str = cubrid_fetch_row($this->req);
echo $str[0];
$this->assertEquals($str[0], 1000);
echo "\r\n-----Running:---------------{$count} ";
}
echo "\r\n#### case Cci6_t10 OK #### ";
} catch (Exception $e) {
echo "\r\n#### Catch Cci6_t10 Exception #### ";
}
$this->sql = "drop table t10";
cubrid_execute($this->con, $this->sql);
cubrid_commit($this->con);
$this->req = null;
}
示例14: commit
/**
* @brief 커밋
**/
function commit()
{
if (!$force && (!$this->isConnected() || !$this->transaction_started)) {
return;
}
@cubrid_commit($this->fd);
$this->transaction_started = false;
}