RE: [PEAR] RE: [PEAR-DEV] numRows(), out of order row fetching and stuff?
| From: | Lukas Smith | Date: | Mon, 21 Jul 2003 18:46:57 +0000 |
| Subject: | RE: [PEAR] RE: [PEAR-DEV] numRows(), out of order row fetching and stuff? | ||
| References: | 1 | Groups: | php.pear.dev php.pear.general |
| Request: | Send a blank email to pear-dev+get-18501@lists.php.net to get a copy of this message | ||
> From: Greg Beaver [mailto:greg@chiaraquartet.net]
> Sent: Monday, July 21, 2003 7:02 PM
>
> Lukas Smith wrote:
> >>From: Hans Lellelid [mailto:hans@appliedsec.com]
> >>Sent: Monday, July 21, 2003 3:39 PM
> >>
> >>| Is it ok to drop numRows()?
> >>
> >>In the apps that I've written with MDB, I don't think I've ever
needed
> >
> > to
> >
> >>use numRows(). I was going to say that numRows() is important when
> >
> > doing
> >
> >>pagination, but even in that case, my "Search" classes just rebuild
a
> >>COUNT(*) version of the query to use for calculating total result
set
> >>length.
> >
> >
> > Yeah if all you are concerned with is the number of rows then use
> > COUNT(*).
>
> Perhaps you could re-implement numRows() to do this, and add a big
> warning about performance, or is the goal to cut off bloat?
Yes as a BC option what you can do is offer a numRows implementation
that takes a the full query as a parameter. This should make porting a
bit easier.
Actually I think that is how PEAR::DB does it for oracle. However I
would want this to stay out side of the MDB and therefore it would
require passing the full query.
Regards,
Lukas