$x=\common\models\Partner::find()->innerJoin('invoice', 'invoice.companyId=companyId')->where(['invoice.companyId'=>'7']);
$x->all();
U::debug($x->createCommand()->getRawSql());
die;
$x=\common\models\Partner::find()->joinWith(['invoices'])->where(['invoice.companyId'=>'7']);
$x->all();
U::debug($x->createCommand()->getRawSql());
die;
Categories: HINTS (tehnice) |
Leave a Reply
[TOP]