Untested, but as a start:
select
events.eventid,
sum(eventattendance.attendees)
from
eventattendance,
events
where
events.eventid=eventattendance.eventid
group by
events.eventid
having
sum(eventattendance.attendees)>events.max
[email protected] on Friday, March 06, 2009 at 11:39 AM -0800
wrote:
>
>Hello -
>
>I am trying to determine if the maximum number of attendees has been met
>for an event. In one table, the maximum attendance allowed is set. In
>another table, the attendees are captured as well as the event id.
>
>The relation is:
>
>Events
>-id *
>-max
>
>EventAttendance
>-eventID *
>
>If the total of eventIDs is greater than or equal to the event max, I
>want to display the event is full to the user on the list of upcoming
>events.
>
>Can any suggestions be provided?
>
>Thank you.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4425
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15