$count = $this->Project->Message->findCount(array('Message.project_id')
=>$MyProjectId);
http://api.cakephp.org/class_model.html#0978aba07f5d196079d7518a99bcfa86


On Dec 27, 12:08 pm, piyushsharmajec <[email protected]>
wrote:
> Hai everyone,
>
> I am newbee in cakephp from last 5 days, devloping project have 2table
> projects and messages.
>
> Each project has many messages, so i set up this by has many association.
>
> The foreign id is project_id in messages table, so i get project name easily
> with association.
>
> However if want no.s of messages in perticuler project in project page i am
> confused.
>
> How can i get this. if anything can be done with association.
>
> Thanks
> Piyush    :super:
> --
> View this message in 
> context:http://www.nabble.com/count-no-of-rows.-tp21183253p21183253.html
> Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to