mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
Fix making a guide-2.0 for the website (#19159)
This commit is contained in:
@ -540,14 +540,14 @@ $query->limit(10)->offset(20);
|
||||
### [[yii\db\Query::join()|join()]] <span id="join"></span>
|
||||
|
||||
[[yii\db\Query::join()|join()]] メソッドは SQL クエリの `JOIN` 句を指定します。例えば、
|
||||
|
||||
|
||||
```php
|
||||
// ... LEFT JOIN `post` ON `post`.`user_id` = `user`.`id`
|
||||
$query->join('LEFT JOIN', 'post', 'post.user_id = user.id');
|
||||
```
|
||||
|
||||
[[yii\db\Query::join()|join()]] メソッドは、四つのパラメータを取ります。
|
||||
|
||||
|
||||
- `$type`: 結合のタイプ、例えば、`'INNER JOIN'`、`'LEFT JOIN'`。
|
||||
- `$table`: 結合されるテーブルの名前。
|
||||
- `$on`: オプション。結合条件、すなわち、`ON` 句。
|
||||
|
Reference in New Issue
Block a user