You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/database/query_builder.rst
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ $query, which can be used to show the results:
88
88
89
89
.. literalinclude:: query_builder/004.php
90
90
91
-
Please visit the :doc:`getResult*() method <results>` page for a full
91
+
Please visit the :ref:`getResult() <getresult>` method for a full
92
92
discussion regarding result generation.
93
93
94
94
$builder->getCompiledSelect()
@@ -101,14 +101,14 @@ Example:
101
101
102
102
.. literalinclude:: query_builder/005.php
103
103
104
-
The first parameter enables you to set whether or not the query builder query
105
-
will be reset (by default it will be reset, just like when using ``$builder->get()``):
104
+
The parameter (false) in the first query below enables you to set whether or not the query builder
105
+
will be reset (because the default value of the parameter is true, ``getCompiledSelect(bool $reset = true)``, by default it will be reset just like when using ``$builder->get()``):
106
106
107
107
.. literalinclude:: query_builder/006.php
108
108
109
109
The key thing to notice in the above example is that the second query did not
110
110
utilize ``limit(10, 20)`` but the generated SQL query has ``LIMIT 20, 10``.
111
-
The reason for this outcome is because the first parameter is set to ``false``.
111
+
The reason for this outcome is because the parameter in the first query is set to ``false``, ``limit(10, 20)`` remained in the second query.
112
112
113
113
$builder->getWhere()
114
114
--------------------
@@ -169,7 +169,7 @@ $builder->selectMin()
169
169
---------------------
170
170
171
171
Writes a **SELECT MIN(field)** portion for your query. As with
172
-
``selectMax()``, You can optionally include a second parameter to rename
172
+
``selectMax()``, you can optionally include a second parameter to rename
173
173
the resulting field.
174
174
175
175
.. literalinclude:: query_builder/011.php
@@ -178,7 +178,7 @@ $builder->selectAvg()
178
178
---------------------
179
179
180
180
Writes a **SELECT AVG(field)** portion for your query. As with
181
-
``selectMax()``, You can optionally include a second parameter to rename
181
+
``selectMax()``, you can optionally include a second parameter to rename
182
182
the resulting field.
183
183
184
184
.. literalinclude:: query_builder/012.php
@@ -187,7 +187,7 @@ $builder->selectSum()
187
187
---------------------
188
188
189
189
Writes a **SELECT SUM(field)** portion for your query. As with
190
-
``selectMax()``, You can optionally include a second parameter to rename
190
+
``selectMax()``, you can optionally include a second parameter to rename
191
191
the resulting field.
192
192
193
193
.. literalinclude:: query_builder/013.php
@@ -196,7 +196,7 @@ $builder->selectCount()
196
196
-----------------------
197
197
198
198
Writes a **SELECT COUNT(field)** portion for your query. As with
199
-
``selectMax()``, You can optionally include a second parameter to rename
199
+
``selectMax()``, you can optionally include a second parameter to rename
200
200
the resulting field.
201
201
202
202
.. note:: This method is particularly helpful when used with ``groupBy()``. For
0 commit comments