Re: QueryTool questions
| From: | Wolfram Kriesing | Date: | Mon, 15 Sep 2003 18:12:35 +0000 |
| Subject: | Re: QueryTool questions | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7822@lists.php.net to get a copy of this message | ||
Jackson Miller wrote:
I have two questions about QueryTool 1) Could a line be added to _construct to allow for using an existing DB object. Something along the lines of: if (DB::isConnection($dsn)) { // use that connection } else { if ($autoConnect) {of course this is possible, i will add it. i remember that that was on my todo anyway. sorry for being so slow :-)$this->connect($dsn);} } The reason I ask for this is that it would make my life using QueryTool within my application API classes a lot easier. On a high traffic site I really want to keep DB connections to a minimum.
2) how do you set the LIMIT part of a query. Is that the getMultiple function? I ask becuase the documentation is a little lacking in that area.either use setLimit(<start>,<count>); getAll(); or getAll(<start>,<count>) getMultiple() is actually an extension to get(). get($id) gets the row for the given $id, where $id is compared to the primary column. And getMultiple($ids) works for multiple number of IDs. -- Wolfram http://opensource.visionp.de ... authentication system .... http://sf.net/projects/auth