Categories
How to make where from another table using ActiveRecord?
Hello. There are two tables let's say tbl1 and tbl2 in which tbl2 refers to tbl1. How can I do something like thisTbl2::find()->where(['tbl1.field' => 1]);
Tbl2::find()->where(['tbl1.field' => 1]);
Answer the question
In order to leave comments, you need to log in
Good evening. Use relationships Working with related data or ibid Using JOIN with relationships
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question