isError Error?
| From: | Michael Stearne | Date: | Fri, 04 May 2001 21:19:17 +0000 |
| Subject: | isError Error? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-119@lists.php.net to get a copy of this message | ||
I am using the mySQL db abstration layer in PEAR. When a result set is returned that has no rows and I call fetchRow() I get an error (function does not exist). I realize that query returns either a DB_result object or a DB_error object. So, what I would assume is that I could call
$myResult=$myDBConnection->query("SELECT * FROM ....");
if($myResult->isError()){
/// then fail
}
But this doesn't seem to work. Why would I need to call DB::isError() to see if I have an error. Why doesn't DB_common extend DB so my DB_mysql object can have direct access to isError without having to refernce DB?
Thanks,
Michael