Hi gcalderon
Why not just query ScorecardDates into a variable:
$scorecard = $this->Scorecard-> findAll('Scorecard.winner = 1 GROUP BY
Scorecard.date', null, 'Scorecard.name ASC')
then set it for the view:
$this->set('ScorecardDates', $scorecard);
You can then use $scorecard in the second query with a for loop of
whatever you require. It's a little more long winded, but not unduly
surely?
Regards,
Langdon
[EMAIL PROTECTED] wrote:
> Hi,
>
> My apologies in advance if this is a redundant or even a dumb question
> but I can't seem to find the answer anyhwere online. I might have
> missed it though since I've been at this for a couple of hours now.
>
> I'm trying to set a variable in my controller method and have it count
> based on a specific db table field.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---