Re: Re: PEAR DB abstraction layers
| From: | Lukas Smith | Date: | Mon, 19 Apr 2004 15:14:55 +0000 |
| Subject: | Re: Re: PEAR DB abstraction layers | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-28041@lists.php.net to get a copy of this message | ||
Martin Jansen wrote:
The difference is as follows: $db->getRow($query, $params, $fetchmode) $mdb2->getRow($query, $types, $params, $param_types, $fetchmode);
Is this the only place where passing NULL values to suppress type handling is necessary? If yes, then I do not see a real problem. (See below.)Yup it is.
I guess this "problem" can easily be solved by solid documentation. (Which looks like the most important problem of MDB at the moment.)Yup thats true. I need to update the MDB docs with all the nice additions that Daniel made to the DB docs. However MDB has as much docs (again missing all the nice additions that Daniel has made in the past few months) as DB (aside from all the 3rd party docs). Just not for all the fun advanced features. Beyond that there are docs which are just not in docbook, which describe some of the advanced features (like the xml schema format, the datatypes etc): http://www.backendmedia.com/MDB2/docs/
Hmm we might be misunderstanding eachother here. Of course MDB2 can set the fetchmode just as DB can (as in $mdb2->setFetchmode()). But they types are a different topic entirely. Those need to be set (or set to null) on a per query basis obviously since the return columns will be different on a per query basis too. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07Anyways moving the types related params to the end of the parameter list would evade this problem, however I dont think it would be very logical for the enduser. I guess the question is if a wrapper around MDB2 which "hides" all of these features is still not faster than DB (especially when using the unbuffered query mode).Without knowing the API of MDB, I suppose one can also set the fetch mode globally, no? If that's the case, passing a bunch of NULL values is no real problem.