Browse Source

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

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19726 44c647ce-9c0f-0410-b52a-842ac1e357ba
mikaelkael 16 years ago
parent
commit
3695221462
1 changed files with 8 additions and 3 deletions
  1. 8 3
      documentation/manual/en/module_specs/Zend_Db_Select.xml

+ 8 - 3
documentation/manual/en/module_specs/Zend_Db_Select.xml

@@ -1105,8 +1105,9 @@ $select = $db->select()
             <para>
             <para>
                 In <classname>Zend_Db_Select</classname>, you can use the
                 In <classname>Zend_Db_Select</classname>, you can use the
                 <methodname>limit()</methodname> method to specify the count of rows and the number
                 <methodname>limit()</methodname> 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.
+                of rows to skip. The <emphasis>first</emphasis> argument to this method is the
+                desired count of rows. The <emphasis>second</emphasis> argument is the number of
+                rows to skip.
             </para>
             </para>
 
 
             <example id="zend.db.select.building.limit.example">
             <example id="zend.db.select.building.limit.example">
@@ -1118,11 +1119,15 @@ $select = $db->select()
 //   SELECT p."product_id", p."product_name"
 //   SELECT p."product_id", p."product_name"
 //   FROM "products" AS p
 //   FROM "products" AS p
 //   LIMIT 10, 20
 //   LIMIT 10, 20
+// Equivalent to:
+//   SELECT p."product_id", p."product_name"
+//   FROM "products" AS p
+//   LIMIT 20 OFFSET 10
 
 
 $select = $db->select()
 $select = $db->select()
              ->from(array('p' => 'products'),
              ->from(array('p' => 'products'),
                     array('product_id', 'product_name'))
                     array('product_id', 'product_name'))
-             ->limit(10, 20);
+             ->limit(20, 10);
 ]]></programlisting>
 ]]></programlisting>
 
 
             </example>
             </example>