У меня есть таблица квартир внутри этого столбца publisher_type.Если publisher_type равен 0, я хочу присоединиться к user_table, а когда publisher_type равен 1, тогда присоединиться к organization_table?
$select->join(
DbTables::TBL_USERS or TBL_ORGANIZATIONS,
DbTables::TBL_USERS or TBL_ORGANIZATIONS . '.id = ' . $this->getTable() . '.publisher_id',
[
'user_full_name' => new Expression("CONCAT(first_name,' ',last_name)"),
'user_phone_number' => 'phone_number',
'user_email' => 'email',
],
Select::JOIN_INNER
);