Apply an Error-Handler to all PEAR::DB Querys

From: Date: Thu, 05 Jun 2003 12:10:43 +0000
Subject: Apply an Error-Handler to all PEAR::DB Querys
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5820@lists.php.net to get a copy of this message
Hi! It would be nice to have one global error-handler for DB-queries with PEAR::DB. Now I must use something like that for each query: $result = $db->query('SELECT...'); if (DB::isError($db)) { die ($db->getMessage()); } But I would like to have a global handler, so every time I send a query to my database, $db is checked for errors, without writing it down after each query. How could I do this? kind regards Andreas

« previous php.pear.general (#5820) next »