Answer the question
In order to leave comments, you need to log in
How to limit the selection from the database in Yii2 in the model?
I know how to make selections in MySQL, but I don’t understand where to write all this in Yii2.
For example, there is a company table and a status field. Values open, closed. The model is generated using Gii. Where should I write "..Where status = "closed"" in the model so that only companies with the closed status are displayed in r=company/index?
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