Database error handling

I have created a dynamic web site which fetches content from tables (Using database - oracle 8, OCI functions). If any table is dropped automatically runtime error saying ".........Warning: OCIStmtExecute: ORA-00942: table or view does not exist in appears..........". Can any body give me the solution as how it can be rectified and some decent message may be displayed instead of the above one.
shylajaAsked:
Who is Participating?
 
maxkirConnect With a Mentor Commented:
Shylaya,
I'm terribly sorry, but could I receive my points for this question ?
0
 
maxkirCommented:

Some hint:

// @ - means suppress errors

@OciExecute($ID, OCI_DEFAULT);

if (OciError($ID))
{
    //Some error happend. You can process it here
}
0
 
aikonCommented:
Hi Shylaja,

You may change the php error reporting error, and catch the error:

a) Changing the error_level:
Open php3.ini and look for error_reporting parameter, by default it is set to 7 so change it to 5.
Note: Php3.ini is locate where you had specified with --with-configure-file-path
If not, it might be at /usr/lib. You can use phpinfo() function to see where is it.

b) Caching errors:
Use de 'die' function:
OciExecute () or die ("Can't send SQL statement to Oracle server");

Regards.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
gravityCommented:
No offence to aikon, but I think Shylaja should reject your answer... maxkir has quite obviously answered the question.
0
 
shylajaAuthor Commented:
Thanks Maxkir, Your comment helped.
0
 
maxkirCommented:
Could you then please accept my comment as the answer ?
If you don't mind ;-))
0
 
aikonCommented:
No problem gravity ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.