RE: [PEAR-DEV] Re: [metabase-dev] numRows in the oracle driver

From: Date: Tue, 11 Mar 2003 08:03:40 +0000
Subject: RE: [PEAR-DEV] Re: [metabase-dev] numRows in the oracle driver
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14189@lists.php.net to get a copy of this message
> -----Original Message----- > From: Manuel Lemos [mailto:mlemos@acm.org] > Sent: Tuesday, March 11, 2003 5:37 AM > To: metabase-dev@yahoogroups.com > Cc: pear-dev@lists.php.net; dev@binarycloud.tigris.org > Subject: [PEAR-DEV] Re: [metabase-dev] numRows in the oracle driver > > Hello, > > On 03/10/2003 06:40 AM, Lukas Smith wrote: > > I am having some trouble getting the numRows() method to work like I > > want it to in the oracle driver. > > > > 1) Right now numRows() works the Metabase way of simply fetching all the > > rows and then returning that number. > > > > 2) PEAR works by checking if the last query was the query for which > > numRows() was called and then doing "SELECT COUNT(*) FROM > > (".$this->last_query.")";. > > > > 1) Was the advantage of not sending off yet another query, which is > > pretty ugly. But it makes the current while loops in fetchCol() and > > fetchAll() fail because they rely on the fact that no other method has > > messed around with the result set. I could fix that by specifying > > fetchInto the exact row I want. This will result in mysql_data_seek > > calls in the mysql driver. > > Metabase handles this circumstance properly. I am not sure what was lost > in your MDB port. Yes I know it does. I also know why it does not work in MDB. This what the above explanation of 1) tries to make clear. I was trying to get rid of needless row seeks. I don't know expensive those are. Maybe some of you can give me some pointers. Manuel I know that none of the decisions you have made in Metabase came because of lack of thought. But some things were related to PHP3, and some were done because you originally did not have bulk fetching etc. So since MDB has the possibility of doing some thing a new while keeping BC through the wrapper I would like to take that opportunity. I also try to poke your brain a bit so that I also get a better understanding of the reasons you had when you made your decisions. Regards, Lukas

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