[dev] Horde_Rdo_Query->limit() fully working?

Jan Schneider jan at horde.org
Thu Nov 10 13:49:47 UTC 2016


Zitat von Sebastian Birnbach <birnbacs at gmail.com>:

> Dear all,
>
> I am working on some PHP code to output one complete table from the backend
> mySQL database for backup purposes. It seems a good idea to retrieve the
> entries this in chunks, so when there are really many of them (say, tens of
> thousands) the db doesn't get overloaded.
>
> For this, I am using HordeRdoMapper->limit($CHUNKSIZE, $offset).
> After every call (->find()), I do a $offset += $CHUNKSIZE on the mapper and
> loop on.
>
> However, if $offset is anything different from 0, nothing is returned from
> the db. Never. Regardless of what integer $offset is set to. Before I file
> a bug, a quick question to you guys: is the limit() method supposed to be
> working with $offset?
>
>   Sebastian

Yes, that's what the docs say.

-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the dev mailing list