Answer the question
In order to leave comments, you need to log in
How to get the number of database requests in Yii?
Yii::app()->db->getStats() does not return the number of queries like Yii::app()->db->createCommand(), only the number of queries like Model::model()- is counted >findAllByAttribute().
Can you please tell me how can I find out the total number of requests?
Answer the question
In order to leave comments, you need to log in
Do you need to know the command or is the debugger suitable?
In this case https://github.com/malyshev/yii-debug-toolbar
If I did not know how to do it, I would find the root method for sending a request and put the counter there, for example, in a file. I would count the requests and remove the extra code back.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question