Skip to content

Commit f67736f

Browse files
authored
Merge pull request #6331 from kenjis/fix-docs-QB-getCompiled
docs: improve explanations of getCompiledUpdate/getCompiledInsert
2 parents 71edcc9 + 68cdb6e commit f67736f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

user_guide_src/source/database/query_builder.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,8 @@ will be reset (by default it will be reset, just like when using ``$builder->get
7878
.. literalinclude:: query_builder/006.php
7979

8080
The key thing to notice in the above example is that the second query did not
81-
utilize ``$builder->from()`` and did not pass a table name into the first
82-
parameter. The reason for this outcome is because the query has not been
83-
executed using ``$builder->get()`` which resets values or reset directly
84-
using ``$builder->resetQuery()``.
81+
utilize ``limit(10, 20)`` but the generated SQL query has ``LIMIT 20, 10``.
82+
The reason for this outcome is because the first parameter is set to ``false``.
8583

8684
$builder->getWhere()
8785
--------------------
@@ -829,9 +827,7 @@ will be reset (by default it will be--just like ``$builder->insert()``):
829827

830828
.. literalinclude:: query_builder/080.php
831829

832-
The reason the second query worked is that the query has not been executed
833-
using ``$builder->insert()`` which resets values or reset directly using
834-
``$builder->resetQuery()``.
830+
The reason the second query worked is that the first parameter is set to ``false``.
835831

836832
.. note:: This method doesn't work for batch inserts.
837833

0 commit comments

Comments
 (0)