Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.9.7
-
Fix Version/s: None
-
Component/s: Zend_Db_Select
-
Labels:None
Description
If you specify a DB table then use select statement with an order and limit clause, the output for the limit range is wrong.
$nUserId = 123;
$select = $this->_table->select();
$select->where('user_id = ?', $nUserId)
->order('createddate DESC')
->limit(0, 200);
print $select;
// SELECT `myRecords`.* FROM `myRecords` WHERE (user_id = '123')
// ORDER BY `createddate` DESC LIMIT 2147483647 OFFSET 2
The limit is supposed to be 0 not 2147483647
Regards,
Cliburn M. Solano
I just ran into this bug too, in my quick test, order does not seem to matter. It seems to be related to building a query off of Zend_Db_Table though. I am using zf 1.11.11.