cubrid_close

(PECL CUBRID >= 8.3.1)

cubrid_closeClose CUBRID connection

说明

cubrid_close ([ resource $conn_identifier ] ) : bool

The cubrid_close() function ends the transaction currently in process, closes the connection handle and disconnects from server. If there is any request handles not closed yet at this point, they will be closed. It is similar to the CUBRID function cubrid_disconnect().

参数

conn_identifier

The CUBRID connection identifier. If the connection identifier is not specified, the last connection opened by cubrid_connect() is assumed.

返回值

TRUE, when process is successful.

FALSE, when process is unsuccessful.

范例

Example #1 cubrid_close() example

<?php
$con 
cubrid_connect ("localhost"33000"demodb");
if (
$con) {
   echo 
"connected successfully";
   
$req cubrid_execute $con"insert into person values(1,'James')");
   if (
$req) {
      
cubrid_close_request ($req);
      
cubrid_commit ($con);
   } else {
      
cubrid_rollback ($con);
   }
   
cubrid_close ($con);
}
?>

参见

相关文章
php cubrid cubrid mysql 兼容性函数php cubrid mysql 兼容性函数 return the number of rows affected by the last sql statementphp cubrid mysql 兼容性函数 return the current cubrid connection charsetphp cubrid mysql 兼容性函数 close cubrid connectionphp cubrid mysql 兼容性函数 move the internal row pointer of the cubrid resultphp cubrid mysql 兼容性函数 get db name from results of cubrid list dbsphp cubrid 函数 close a database connectionphp cubrid mysql 兼容性函数 get the error messagephp cubrid mysql 兼容性函数 fetch a result row as an associative array a numeric array or bothphp cubrid mysql 兼容性函数 return the associative array that corresponds to the fetched rowphp cubrid mysql 兼容性函数 get column information from a result and return as an objectphp cubrid mysql 兼容性函数 return an array with the lengths of the values of each field from the current rowphp cubrid mysql 兼容性函数 fetch the next row and return it as an objectphp cubrid mysql 兼容性函数 return a numerical array with the values of the current rowphp cubrid mysql 兼容性函数 return a string with the flags of the given field offsetphp cubrid mysql 兼容性函数 get the maximum length of the specified fieldphp cubrid mysql 兼容性函数 return the type of the column corresponding to the given field offsetphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp cubrid mysql 兼容性函数 return the number of columns in the result setphp cubrid mysql 兼容性函数 ping a server connection or reconnect if there is no connection
关注编程学问公众号