瀏覽代碼

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 年之前
父節點
當前提交
3695221462
共有 1 個文件被更改,包括 8 次插入3 次删除
  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>
                 In <classname>Zend_Db_Select</classname>, you can use the
                 <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>
 
             <example id="zend.db.select.building.limit.example">
@@ -1118,11 +1119,15 @@ $select = $db->select()
 //   SELECT p."product_id", p."product_name"
 //   FROM "products" AS p
 //   LIMIT 10, 20
+// Equivalent to:
+//   SELECT p."product_id", p."product_name"
+//   FROM "products" AS p
+//   LIMIT 20 OFFSET 10
 
 $select = $db->select()
              ->from(array('p' => 'products'),
                     array('product_id', 'product_name'))
-             ->limit(10, 20);
+             ->limit(20, 10);
 ]]></programlisting>
 
             </example>