Continue on Mysql error

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I've an insert statement that takes datas from XML files. Sometimes, for
some reasons, the XML file get corrupted. If it's the case, the script
crashes and it doesn't continue, even if the following items are ok.

How to let the script continue, even if there is an "insert" error (or any
error). I won't my script to stop. I will be able to log where the problem
is then continue the script. I can then come back later to analyse the
corrupted file.


Re: Continue on Mysql error

Bob Bedford wrote:
Quoted text here. Click to load it
(or any
Quoted text here. Click to load it

This can be achieved by "stacking" the errors using
set_error_handler() < Also, search
for some classes on this error handling. I have a class which when
configured can do exactly this--but can't outsource it now as it is
quite proprietary.

<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com    Blog: /

Site Timeline