We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e31d894 commit 3a5db33Copy full SHA for 3a5db33
guide/index.rst
@@ -1807,12 +1807,22 @@ The Model has some extra methods for doing common operations:
1807
Count
1808
"""""
1809
1810
-A basic function to count all rows in the table.
+A basic function to count rows in the table.
1811
1812
.. code-block:: php
1813
1814
$count = $model->count(); // int
1815
1816
+Optionally, with a parameter to the WHERE clause:
1817
+
1818
+.. code-block:: php
1819
1820
+ $where = [
1821
+ ['id', '<', 100], // WHERE `id` < 100
1822
+ ['name', 'like', 'Pa%'], // AND `name` LIKE 'Pa%'
1823
+ ];
1824
+ $count = $model->count($where); // int
1825
1826
Replace
1827
"""""""
1828
0 commit comments