RE: [PEAR] Re: [PEAR-DEV] RE: [PEAR] RE: [PEAR-DEV] numRows(), out of order row fetching and stuff?

From: Date: Wed, 23 Jul 2003 11:38:39 +0000
Subject: RE: [PEAR] Re: [PEAR-DEV] 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-18579@lists.php.net to get a copy of this message
> From: Tomas V.V.Cox [mailto:cox@idecnet.com] > Sent: Wednesday, July 23, 2003 1:29 PM > 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). This is what MDB already does in a few drivers. Obviously this could be made optional, but I just wonder if its worth the hassle. > 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 ;) Yeah I was thinking of using this as a BC hack where you could then do something like $mdb->bchack->numRows($query); instead of §mdb->runRows($result); regards, Lukas

« previous php.pear.dev (#18579) next »