Answer the question
In order to leave comments, you need to log in
Why doesn't Joinwith work with a parameter?
$organization_id=User::findOne(Yii::$app->user->id)->personal->organization->id;
$query = Mani::find()->where('status!=9')->orWhere('status is Null')->joinWith(['history' => function ($q) {
$q->where('history_mans.organization_id=:id',[':id'=>$organizaion_id]);
}]);
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