When trying to set the limit on setQuery($items, 0, 5) no effect.
Results should be limited to 5
Unlimited results
Setting Value
PHP Built On Linux ps20763 3.1.9-vs2.3.2.5vs2.3.2.5+ #3 SMP Wed Feb 12 13:51:29 PST 2014 x86_64
Database Version 5.1.56-log
Database Collation utf8_general_ci
PHP Version 5.4.37
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.4.0 Stable [ Ember ] 24-February-2015 23:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.74 Safari/537.36
Labels |
Added:
?
|
$db->setQuery() limit has no affect under the PDO driver but works on mysqli
Confirmed with code in this Gist https://gist.github.com/bdf4c5a29b6097098922
Should output 5 5 5 - but with JDatabaseDriverPdomysql we get 152 (or a number larger than 5 depending on your test data - but still, should be 5! )
From what I could tell without actually testing, it's because of the handling in JDatabaseDriverPdo::setQuery()
that manipulates the query before passing up to the parent JDatabaseDriver::setQuery()
. Unrelated to this issue, there appears to be a strict standards issue in the first method I described due to the extended method signature.
Closed as we have a Pr - thanks
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-28 23:22:25 |
Closed_By | ⇒ | brianteeman |
Closed_Date | 2015-02-28 23:22:25 | ⇒ | 2015-02-28 23:22:26 |
Update info for error.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6232.