$sb = new Select();
$sb
->select('u.name')
->from('users', 'u')
->rightJoin('u', 'phone', 'p', 'p.is_primary = 1');
public rightJoin ( string $fromAlias, string $join, string $alias, string $condition = null ) : |
||
$fromAlias | string | the alias that points to a from clause |
$join | string | the table name to join |
$alias | string | the alias of the join table |
$condition | string | the condition for the join |
return | instance |
public function rightJoin($fromAlias, $join, $alias, $condition = null)
{
$this->aliases[] = $alias;
return $this->addQueryPart('join', [$fromAlias => ['joinType' => 'right', 'joinTable' => $join, 'joinAlias' => $alias, 'joinCondition' => $condition]], true);
}