한국어 Login Register

Versions available for this page: CUBRID 8.4.0 |  CUBRID 8.4.1  | 

cubrid_close

Description

The cubrid_close() function is used to stop transactions currently being executed, terminate the connection with the server and close the connection handle. All request handles that are still open will be closed.

Syntax

bool cubrid_close ([resource $con_identifier])

  • con_identifier : Connection identifier. If the connection identifier is not specified, the last connection opened is assumed.
Return Value
  • Success : TRUE
  • Failure : FALSE
Example

$con = cubrid_connect("192.168.0.10", 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);

}

See Also