Answer the question
In order to leave comments, you need to log in
How to count COUNT with condition in DataProvider?
Hello! Prompt, please:
There is MyModelSearch
In the method public function search($params)
I write $query = MyTable::find()->....,
and I get dataProvider.
I passed this dataProvider to the view in GridView and I display all the columns from the MyTable table.
For example, 40 entries in the temperature column are displayed.
How to display the Count(temperature > 10) value separately from the GridView on the page?
Answer the question
In order to leave comments, you need to log in
Count(temperature > 10)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question