Re: PEAR::DB getAll feature request (limit from,count)

From: Date: Thu, 27 Feb 2003 17:11:16 +0000
Subject: Re: PEAR::DB getAll feature request (limit from,count)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14004@lists.php.net to get a copy of this message
I don't really see a problem with going the MDB api on this one if everyone agrees that it is better, I need the functionality and I don't really care how it is done. Btw I was thinking of giving MDB a try and I might just do it these days if time permits, is the API compatible with DB, I remeber some talks about a PEAR compatibility layer Yavor Lukas Smith wrote:
-----Original Message----- From: Yavor Shahpasov [mailto:yavo@siava.org] Sent: Thursday, February 27, 2003 5:57 PM To: pear-dev@lists.php.net Subject: [PEAR-DEV] PEAR::DB getAll feature request (limit from,count) What are the chanses of adding two extra parameters to getAll in DB, from and count, and if set use limitQuery instead of query (this would have to be added to DB_Common excute too though). Since we are talking about two new parameters this would not break BC but it would have to be implemented . plus it would probably be good
to
be added to getCol and getAssoc too. It would be really usefull for me and am sure for others. If people
are
too busy to implement this I would provide the patches (no some
backends
atleast am thinking mysql/pgsql) assuming this feature gets approved. here is and example +getAll($query, $params = null, $fetchmode = DB_FETCHMODE_DEFAULT) -getAll($query, $params = null, $fetchmode = DB_FETCHMODE_DEFAULT, $from=null, $count=null)
Noooooo please don't! MDB has a much cleaner method for this: Before any method call that sends a query to the DB you can use the setSelectedRowRange() method to set offset/limit. This does away with any need for this kind of API bloat. I don't know if anyone feels like porting this feature to DB, but I certainly hope we will not further add changes to the DB API for which there are much better solutions already in MDB or we can soon forget about calling MDB the next gen DB because the API differences will be too great. Regards, Lukas


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