Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
I have "Concours" has many "user". In my backoffice for show how many user have a concours, i use count($concours->users). But with 8150 users in one concours, i can see some lag...
What's the best way for just get the number of "User" in a "Concours" ? I need to do manually a query ?
try: $count = Model_User::count(array('where' => array(array('concours_id', '=', $concours->id))));
If you try to access the data via it's parent, a lazy load query will start, so you're basically selecting 8150 records just to do a count.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion