MySQL count vs PHP count

chrisj

Active member
Why would xenforo use mysql count and add an extra query?

For example XenForo_ControllerPublic_Member actionIndex gets an array of all the users with getUsers and then it calls countUsers as well.
 
Because in this case getUsers() is only fetching X number of members as indicated by the 'perPage' and 'page' parameters, while countUsers() fetches the total count of (valid none banned) members.
 
Top Bottom