Issues

ZF-6237: Wrong order used in example of the limit() method

Issue Type: Docs: Problem Created: 2009-04-08T03:20:41.000+0000 Last Updated: 2009-12-17T13:17:17.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Bert Van Hauwaert (becoded) Assignee: Mickael Perraud (mikaelkael) Tags: - Zend_Db_Select

Related issues: Attachments: - Zend_Db_Select.xml.diff

Description

"Example 15.67. Example of the limit() method" wants to reproduce the following query:

<pre class="highlight">
with the following code

$select = $db->select() ->from(array('p' => 'products'), array('product_id', 'product_name')) ->limit(10, 20);

<pre class="highlight">
In the API reference, you find the following

So to reproduce the query, you need to swap the numbers 10 and 20.

<pre class="highlight">$select = $db->select()
             ->from(array('p' => 'products'),
                    array('product_id', 'product_name'))
             ->limit(20, 10);

Comments

Posted by Jeroen Le Roy (ultimasnake) on 2009-06-11T03:40:34.000+0000

We (my company) Also stumbled on this problem, unfortunatly we found this problem while limit is implemented on allot of applications.

I guess, it's a documentation bug BUT none the less should be looked at since everybody is relying on the docs!

Posted by Robert Basic (robertbasic) on 2009-11-29T08:21:47.000+0000

Attached the diff file.

Posted by Mickael Perraud (mikaelkael) on 2009-12-17T13:17:17.000+0000

Patch applied with r19726

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts