Re: Pear_Error not triggered when mysql is down with MDB2
| From: | Lorenzo Alberton | Date: | Thu, 07 Jul 2005 14:38:22 +0000 |
| Subject: | Re: Pear_Error not triggered when mysql is down with MDB2 | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19893@lists.php.net to get a copy of this message | ||
Dan Rossi wrote:
Hi there I just realised something, if the database server is down no pear error gets triggered like the rest I am calling the fetchmode method after creating the connection however when the server is off i get this fatal error Fatal error: Call to undefined method MDB2_Error::setFetchMode() in $this->_db = MDB2::connect($this->settings['DB_DataObject']['database'],$this- settings['DB_DataObject']['MDB2']);if (PEAR::isError($this->db)) {
//uh-oh... handle error}
$this->_db->setFetchMode(MDB2_FETCHMODE_ASSOC);Regards, -- Lorenzo Alberton http://pear.php.net/user/quipo