OK, so it doesnt seem to be a bug judging by what Valeriy said and the link
posted but i think this maybe a bit drastic, as Hector said I think limit 0,
null or false should just remove or even dont add the limit part?

Daniel.

On 3 October 2010 01:24, Hector Virgen <[email protected]> wrote:

> So limit 0 (or limit null, or limit false) would remove the limit portion
> if the query?
>
> --
> Hector Virgen
> Sent from my Droid X
> On Oct 2, 2010 5:21 PM, "Daniel Latter" <[email protected]> wrote:
> > or just throw away the limit part altogether?
> >
> > Daniel
> >
> > On 3 October 2010 01:17, Hector Virgen <[email protected]> wrote:
> >
> >> Limit 0 us definitely an incorrect usage, so maybe an exception should
> be
> >> thrown?
> >>
> >> --
> >> Hector Virgen
> >> Sent from my Droid X
> >> On Oct 2, 2010 5:15 PM, "Daniel Latter" <[email protected]> wrote:
> >> > Hi,
> >> >
> >> > I know what your saying but my point is that, is this intended
> behaviour
> >> to
> >> > return a number so large if a zero happend to be passed.?
> >> >
> >> > Thanks
> >> > Daniel.
> >> >
> >> > 2010/10/3 Valeriy Yatsko <[email protected]>
> >> >
> >> >> 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.
> >> >>
> >> >> --
> >> >> Валерий Яцко
> >> >>
> ______________________________________________________________________
> >> >> [email protected] | http://www.artlebedev.ru
> >> >>
> >> >>
> >>
>

Reply via email to