简体   繁体   中英

SQL error reporting by mail

I was wondering if its possible to have some kind of SQL error reporting that sends me an email that includes the error and the website that it's been found on.

I'd like to take this precaution because of hosting multiple drupal systems.

There is a PHP error variant:

http://drupal.org/project/php_errors

Hope you guys know a way to become aware of any possible SQL errors by not loggin in to check the error report.

What version of SQL?
What type of "errors"?

Depending on how you handle/log errors you can configure a periodic SQL job to email you the results of a query.

You can surround

try{
   // Code
}catch(Exception $e){
   // Exception management
} 

all your code with a php mailing function in the catch side. Thus you have the automatic reporting you are looking for, without using any automating software.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM