Good day

> dont know if this is a bug or not but if you pass the following parameters
> to the limit method on select object like so:
> 
> ->limit(0, 10);
> 
> It produces the following SQL:
> 
> LIMIT 2147483647 OFFSET 10
> 
> now i know you should vaidate the limit val beforehand but this could
> potentially kill someones app?


In Zend_Db_Select, you can use the limit() method to specify the count of rows 
and the number of rows to skip. The first argument to this method is the 
desired count of rows. The second argument is the number of rows to skip.

So you should use
->limit(10,0)
instead.

--
Валерий Яцко
______________________________________________________________________
d...@design.ru | http://www.artlebedev.ru

Reply via email to