Re: RE: [PEAR] RE: [PEAR-DEV] numRows(), out of order row fetching and stuff?
| From: | Tomas V.V.Cox | Date: | Wed, 23 Jul 2003 11:28:59 +0000 |
| Subject: | Re: 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-18577@lists.php.net to get a copy of this message | ||
On Monday, July 21, 2003 20:46, Lukas Smith wrote:
>> 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.
Just build an array that associates the query launched with the result
resource ($this->queries[(int)$res]), so you can emulate numrows
safely (and costly btw).
Someone talked about the AdoDB implementation, I've took a look at it
and looks very nice. It tries the query rewrite method and if it's not
possible runs the original query. I'll pick up your code for PEAR::Db
with your permission John ;)
--
Tomas V.V.Cox mailto:cox@idecnet.com