Hi bakers!

I have 2 questions for you:

1)Is it possibile to use afterFind with pagination?


2) I have this association: Cities hasMany Users.
How can i do a query to have the list of the city with the number of
people who lives in it?
sounds like to add after a findAll


foreach ($city)
{
$city['population']=$this->users->find('count', array('condition' =>
array('cities_id' => $city['id'])));
}

Is there a cakeway?!
thank you so much!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to