(PECL CUBRID >= 8.3.1)
cubrid_close — 关闭 CUBRID 连接
cubrid_close() 函数结束当前正在进行的事务,关闭连接句柄并断开与服务器的连接。如果此时还有未关闭的任何请求句柄,它们将被关闭。它类似于 CUBRID 函数 cubrid_disconnect().
示例 #1 cubrid_close() 示例
<?php
$con = cubrid_connect ("localhost", 33000, "demodb");
if ($con) {
echo "连接成功";
$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);
}
?>