sometimes i need build query and i need two join or more in code (depend on selected item). so i should create joins and concat to other part of query but it doesnt work.
so if i need
$user = Yii::app()->db->createCommand()
->select ...
->from ...
->join (...)
->join (...)
->join (...)
i should create ->join
something like this
$user = Yii::app()->db->createCommand()
->select
->from
foreach ($arrayjoin as $join)
{
echo "$join";
}
how to do this?
another thing is why join doesn’t accept array like where .
so i can have
->join(a array of needed join)
instead of
->join(needed join)
->join(needed join)