Advice on Error Handling ...
Posted: Wed Dec 26, 2007 10:35 am
We utilize several Includes which output
results from a MySQL script.
The Includes look like this:
This code is trouble-free until we encounter the occasional SQL error.
If an error occurs, (obviously) a MySQL error displays and screws up the screen.
What I'd like to do is add some error handling.
Something like...
Thanks!
results from a MySQL script.
The Includes look like this:
Code: Select all
<? include "http://www.site.com/php/psDynamic/psDynamic.php?command=view&cid=89" ; ?>If an error occurs, (obviously) a MySQL error displays and screws up the screen.
What I'd like to do is add some error handling.
Something like...
- Try the Include
- If result contains text 'failed' or '503', then do not display, then exit.
- Display Include
Thanks!