Answer the question
In order to leave comments, you need to log in
How to set a separate logic for calculating itemsCount for TbGridView Yii1?
I use the TbGridView widget, it sets 'dataProvider'=>$model->search()
As you know, it counts the number of records using the same search method and takes count of them ..
Can I somehow change that query and set the number myself, parameter? because in search() I have several links, but they work on the principle of "LEFT OUTER JOIN", that is, the output of the original table will be complete.
Or select the data, and then count the array?.. This is when the search, I understand that there will not be all the data from the source table, but just according to the results of the selection and tables by connection.
Because there is a lot of data and it turns out that it spends almost twice as much time processing that everything ...
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