I'm just saying that 0 is often times used that way. (eg.
session.cookie_lifetime)
It also makes sense if you're setting the limit to 0, as in no limit (0 ==
false), vs. limit (reduce) the resultset to 0 rows (which is how MySQL
understands it).
David
--
View this message in context:
http://ze
Right, but currently, people rely on this behavior.
Not b/c they believe that limit(0) should return Zero rows, but because
in our loosely-typed world, limit(null) or limit(false) means return
everything.
Unfortunately, limit() current casts everything to an integer, so
someone calling limit
FETCH FIRST 0...
SELECT TOP 0...
SELECT... LIMIT 0
I'm having trouble believing that anyone would expect more than zero rows to
be returned.
I agree with you about throwing an exception for limit zero, but since we
can't have a BC break, the next best thing IMO would be to honor the
developer's i
What is intuitive to all though? Since Zend_Db is an abstraction layer
around various vendor databases, it has to encapsulate the "general
perspective" of all the database targets.
Since LIMIT in SQL is far from standardized, and since no predominant
understanding of LIMIT across all database
So zero equals infinity? Interesting... But with ZF being object-oriented, I
think we can expect more intuitive behavior.
--
Hector Virgen
Sent from my Droid X
On Oct 5, 2010 4:56 AM, "David Muir"
>
wrote:
I would have expected limit 0 to mean "no limit" or "unlimited".
The current behaviour seems to follow that pattern.
That said, PHP's LimitIterator treats -1 as unlimited and 0 triggers an
OutOfBoundsException.
Cheers,
David
--
View this message in context:
http://zend-framework-community.6341