File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
user_guide_src/source/database Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,8 @@ Use the ``$db->newQuery()`` method to make a subquery the main table:
247
247
Join
248
248
====
249
249
250
+ .. _query-builder-join :
251
+
250
252
$builder->join()
251
253
----------------
252
254
@@ -270,7 +272,7 @@ RawSql
270
272
271
273
.. versionadded :: 4.2.0
272
274
273
- Since v4.2.0, ``$builder->join() `` accepts a ``CodeIgniter\Database\RawSql `` instance, which expresses raw SQL strings.
275
+ Since v4.2.0, ``$builder->join() `` accepts a ``CodeIgniter\Database\RawSql `` instance as the JOIN ON condition , which expresses raw SQL strings.
274
276
275
277
.. literalinclude :: query_builder/102.php
276
278
@@ -1498,13 +1500,14 @@ Class Reference
1498
1500
.. php :method :: join($table, $cond[, $type = ''[, $escape = null]])
1499
1501
1500
1502
:param string $table: Table name to join
1501
- :param string $cond: The JOIN ON condition
1503
+ :param string|RawSql $cond: The JOIN ON condition
1502
1504
:param string $type: The JOIN type
1503
1505
:param bool $escape: Whether to escape values and identifiers
1504
1506
:returns: ``BaseBuilder `` instance (method chaining)
1505
1507
:rtype: ``BaseBuilder ``
1506
1508
1507
- Adds a ``JOIN `` clause to a query.
1509
+ Adds a ``JOIN `` clause to a query. Since v4.2.0, ``RawSql `` can be used
1510
+ as the JOIN ON condition. See also :ref: `query-builder-join `.
1508
1511
1509
1512
.. php :method :: where($key[, $value = null[, $escape = null]])
1510
1513
You can’t perform that action at this time.
0 commit comments