Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2015

    Question Unanswered: Making custom error messages on website

    Hi there

    I am new to this - sorry if I don't make 100% sense!

    I am making a booking website that uses Oracle as the backend data source - it allows the user to read and write to the database using PHP which is fully functioning on the site. However, I would like to make custom error messages that are as friendly and as descriptive to the user when an ORA message is generated. This is what a user would see at the moment on the website if the was an error:

    Warning: oci_execute(): ORA-20000: This customer is already on this booking. ORA-06512: at "B1111111.TRG_CUST_CHECK", line 5 ORA-04088: error during execution of trigger 'B1111111.TRG_CUST_CHECK' ORA-06512: at "B1111111.ADD_CUSTOMER", line 5 ORA-06512: at line 1 in /DIRECTORY/DIRECTORY2/6/b1111111/public_html/dds/Insert_New_Customer.php on line 99 Call Stack: 0.0441 661600 1. {main}() /DIRECTORY/DIRECTORY2/6/b1111111/public_html/dds/Insert_New_Customer.php:0 0.1455 666872 2. oci_execute() /DIRECTORY/DIRECTORY2/6/b1111111/public_html/dds/Insert_New_Customer.php:99

    Even though I have defined the custom message in Oracle as "This customer is already on this booking.", how do I get it so that the rest of the above message doesn't show?

    Sorry if it's in the wrong area!


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    use error handling within PHP. personally ive never used Oracle in PHP but read up on the error handling offered as part of the Oracle object. Examine the error message and take whatever action you deem appropriate.
    use the 'OR' construct if you prefer
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts