Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PHP Error Example

Code Block
 // Example of error reporting.
    $con = db2_connect(DB, USER, PASS, array("i5_naming" => DB2_I5_NAMING_ON));
    if (!$con) {
    
      $response = array(
      
        "success" => false,
        "errorId" => db2_conn_error(),
        "errorText" => db2_conn_errormsg()
      
      );
      
      print json_encode($response);
      return;
    
    }

Returned JSON Error Example

This is the information returned using JSON formatting to report an error with an auto-complete textbox. This was passed from the example above.

...