Re: DB error

From: Date: Wed, 23 Nov 2005 00:11:48 +0000
Subject: Re: DB error
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22064@lists.php.net to get a copy of this message
On Tue, 22 Nov 2005 14:45:17 -0800, Justin Patrin wrote: > Your isError call should catch such cases. Try doing a print_r of $res > when such a thing happens to see what it is. Perhaps: if (!is_a($res, > 'DB_Result')) { > print_r($res); > } > to see what's happening. In those rare situations when the connection is lost between obtaining a resource and using the resource isError will not catch the error. E.g the isError will only catch errors related to $res =& $db->query($sql) but not errors related to $res->fetchRow(). Remember $res is only holding a reference to some place in the database servers memory where the actual data are receding. -- Hilsen/Regards Michael Rasmussen http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917

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