CUBRID_ERROR_CODE(3)							 1						      CUBRID_ERROR_CODE(3)

cubrid_error_code - Get error code for the most recent function call

SYNOPSIS
int cubrid_error_code (void ) DESCRIPTION
The cubrid_error_code(3) function is used to get the error code of the error that occurred during the API execution. Usually, it gets the error code when API returns false as its return value. PARAMETERS
This function has no parameters. RETURN VALUES
Error code of the error that occurred, or 0 (zero) if no error occurred. EXAMPLES
Example #1 cubrid_error_code(3) example <?php $conn = cubrid_connect("localhost", 33000, "demodb"); $req = cubrid_prepare($conn , "SELECT * FROM code WHERE s_name=?"); $req = @cubrid_execute($req); 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: 4 Error code: -30015 Error msg: Some parameter not binded SEE ALSO
cubrid_error_code_facility(3), cubrid_error_msg(3). PHP Documentation Group CUBRID_ERROR_CODE(3)