Answer the question
In order to leave comments, you need to log in
How to use orderBy() when using Join in yii2?
You need to sort the records by the attached table. How can I do that? The following construct does not work...
$entries = EntryItems::find()->where(['acc_id'=>$model->id,'entry.status'=>Entry::STATUS_ACTIVE]) ->innerJoin('entry','entry.id=entry_items.id')->orderBy('entry.date_paid')->with('entry')->all();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question