I have created a cakepip application. I have two models
is a group and other users
There are many user users in the group - Group Group
In my Consumer Table, I have Group_ID column that displays the group ID for which the user belongs (User only one group Can be a member)
Now if I have all the users in special groups To want to display the number ..
games (19 games group name and one 9) such as the number of that group of users.
How do I get the output as a game (19)?
I appreciate any help.
Thank you. / P>
There is a lot on the question before connecting and receiving results:
The original form If you have the appropriate link in your user model, then the groups will be automatically brought to the following format:
[user] = & gt; Array ([0] = & gt; array ([ID] => 1, [name] = & gt; 'John', [group_id] => 1, [group] => array ([ Id] = & gt; 1, [name] = & gt; all ' Regarding counting the groups. You can always calculate the number of groups of arrays used by calculating the nodes You can count under, but use smartly.
Comments
Post a Comment