cubrid_close

Description

The cubrid_close function stops transactions currently being executed, disconnect connection from server, and close an 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])

Return Value
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