?
Referenced as Pull Request for: # 10139
avatar ssv445
ssv445
27 Apr 2016

While using limit & offset on a query objects (which is inherited from JDatabaseQuery but does not implement JDatabaseQueryLimitable), there is no way limit & offset can be utilized.

Query as -
$db->setQuery($query, $start,$offset)
It will set limit & offset on db object.
https://github.com/joomla/joomla-cms/blob/3.5.1/libraries/joomla/database/driver.php#L2115

But when the limit & offset is expected to be utilized a cross check is done on JDatabaseQuery
https://github.com/joomla/joomla-cms/blob/3.5.1/libraries/joomla/database/driver/mysqli.php#L569

This way in any way, I cannot apply limit & offset without implementing JDatabaseQueryLimitable.

Steps to reproduce the issue

Expected result

Should return only limited records

Actual result

Currently when we mention limit & offset on query, and execute it, it returns all records.

System information (as much as possible)

Additional comments

This is a simple fix, to check for same class.

avatar ssv445 ssv445 - open - 27 Apr 2016
avatar brianteeman
brianteeman - comment - 27 Apr 2016

As it is a "simple fix" please submit a pull request

avatar brianteeman brianteeman - change - 27 Apr 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 30 Apr 2016

Closed as we have a pull request

avatar brianteeman brianteeman - change - 30 Apr 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-04-30 09:49:53
Closed_By brianteeman
avatar brianteeman brianteeman - close - 30 Apr 2016

Add a Comment

Login with GitHub to post a comment