From 3d738fc62ac2453e0b7afe6f5c2916634bb83233 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 25 Jul 2024 10:19:06 +0900 Subject: [PATCH] docs: update descriptions --- user_guide_src/source/database/query_builder.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 171c354d1120..454fc56c6bbf 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -247,6 +247,8 @@ Use the ``$db->newQuery()`` method to make a subquery the main table: Join ==== +.. _query-builder-join: + $builder->join() ---------------- @@ -270,7 +272,7 @@ RawSql .. versionadded:: 4.2.0 -Since v4.2.0, ``$builder->join()`` accepts a ``CodeIgniter\Database\RawSql`` instance, which expresses raw SQL strings. +Since v4.2.0, ``$builder->join()`` accepts a ``CodeIgniter\Database\RawSql`` instance as the JOIN ON condition, which expresses raw SQL strings. .. literalinclude:: query_builder/102.php @@ -1498,13 +1500,14 @@ Class Reference .. php:method:: join($table, $cond[, $type = ''[, $escape = null]]) :param string $table: Table name to join - :param string $cond: The JOIN ON condition + :param string|RawSql $cond: The JOIN ON condition :param string $type: The JOIN type :param bool $escape: Whether to escape values and identifiers :returns: ``BaseBuilder`` instance (method chaining) :rtype: ``BaseBuilder`` - Adds a ``JOIN`` clause to a query. + Adds a ``JOIN`` clause to a query. Since v4.2.0, ``RawSql`` can be used + as the JOIN ON condition. See also :ref:`query-builder-join`. .. php:method:: where($key[, $value = null[, $escape = null]])