Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 | 



cubrid_error_code_facility

Description

The cubrid_error_code_facility function gets a facility code (level at which the error occurred) from the code of the error that occurred during the API execution. Usually, the error code can be fetched when the API returns FALSE.

Syntax

int cubrid_error_code_facility ()

Return Value
  • Facility code of the occurred error code :
    CUBRID_FACILITY_DBMS, CUBRID_FACILITY_CAS,
    CUBRID_FACILITY_CCI, CUBRID_FACILITY_CLIENT
Example

<?php

$conn = cubrid_connect("localhost", 33000, "demodb");

$req = @cubrid_execute($conn, "SELECT * FROM unknown");

if (!$req) {

    printf("Error facility: %d Error code: %d Error msg: %s ",

        cubrid_error_code_facility(), cubrid_error_code(), cubrid_error_msg());

 

    cubrid_disconnect($conn);

    exit;

}

?>

 

The above example will output:

 

Error facility: 1

Error code: -493

Error msg: Syntax: syntax error, unexpected UNKNOWN

See Also