Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

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



cubrid_close

Description

The cubrid_close function stops transactions currently being executed, disconnect connection from server, and close a connection handle. If any request handles not being closed yet exists, all of them will be closed. The cubrid_close and cubrid_disconnect functions are used interchangeably exception that an input argument can be omitted in the cubrid_close function. If the input argument is omitted, a connection identifier created most recently is handled as an input argument.

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