RE: [PHP-PEAR] Pear Db layer
| From: | Richard Heyes | Date: | Sat, 30 Sep 2000 18:15:21 +0000 |
| Subject: | RE: [PHP-PEAR] Pear Db layer | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-307@lists.php.net to get a copy of this message | ||
> Yes:
>
> if (DB::isError($result = $dbh->query($query))) {
> // error condition, handle it
> } else {
> anything that's conditional on success
> }
Great. Thanks.
> > 2. There didn't appear to be a numRows() method or a affectedRows()
> > method. If this is just a case of it not having been gotten
> around to,
> > there's some code below that works.
>
> >From the comments in the code, this are on the wishlist;
> I'll look at adding
> your code, but the issue may be simply how to implement this
> for dbs other
> than mysql...
One thing I noticed after I posted that was that I'd put affectedRows()
in the DB_result class, but since affectedRows() doesn't work on/use a
result set, it probably shouldn't be there. :)
Take care.
--
Richard Heyes