[dev] Datatree_sql::getByAttributes question
Chuck Hagenbuch
chuck at horde.org
Fri Jun 22 03:42:29 UTC 2007
Quoting Michael Rubinsky <mike at theupstairsroom.com>:
> I believe I've tracked the problem down to
> Datatree_sql::getByAttributes(). It looks like it performs a
> separate query for each of the [OR] conditions, then puts all the
> results into the $rows array that is returned. The problem is, if
> we are setting a LIMIT, then we could be getting back more than the
> $count since *each* query can return up to $count rows.
>
> Am I on the right track here?
Yup. That was done theoretically for performance. Looks like we either
need to do it in one shot if there's a limit, or modify the
start/limit parameters (actually just start, right?) based on the # we
get back from each consecutive OR.
-chuck
More information about the dev
mailing list