Re: setLimit and _modifyQuery broken on MDB2
| From: | Justin Patrin | Date: | Wed, 06 Apr 2005 16:08:12 +0000 |
| Subject: | Re: setLimit and _modifyQuery broken on MDB2 | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18545@lists.php.net to get a copy of this message | ||
On Apr 5, 2005 7:06 PM, Dan Rossi <pear@electroteque.org> wrote:
> Ok somehow it worked but now it doesnt :| took me 2 hours to debug this
>
> $offset = $this->row_offset;
> $limit = $this->row_limit;
> $this->row_offset = $this->row_limit = 0;
> $query = $this->_modifyQuery($query, $isManip, $limit, $offset);
>
> this is how its setup in the query method
>
> function _modifyQuery($query)
> {
> return $query;
> }
>
> just returns the query therefore is not setting limit information from
> set limit !
>
Well, that's in the common driver object. The mysql driver, for
instance, does do something here. But I don't think that _modifyQuery
does what you think it does. It looks like it's only for drivers to
alter SQL to make it work on their DB.
The setLimit values ae used in (at least in the mysql driver's case)
in the query method to add a LIMIT to the SQL. The LIMIT values should
be used...
What DB are you using for all of these tests? Perhaps the driver for
your DB isn't as fully featured as you think?
--
Justin Patrin