[TYPO3-mvc] QueryResult object has issues with offsets and "count" method ?

Bastian Waidelich bastian.waidelich at typo3.org
Fri Nov 19 12:08:09 CET 2010


Bastian Waidelich wrote:

> Can you try if it works if you add
> if (isset($statementParts['orderings'])) {
> unset($statementParts['orderings']);
> }

I meant
if (isset($statementParts['limit'])) {
	unset($statementParts['limit']);
}

of course.

But that won't be the ultimate solution. Because if limit is set, you 
probably _want_ to count only the limited result set.
I can't think of another (dbal-compatible) way than the following:

If the a limit / group constraint is set, we need to count the results 
via sql_num_rows()..

But usually that should not be the case. Why are you counting objects 
with a limit query?

Bastian


More information about the TYPO3-project-typo3v4mvc mailing list