At 12:22 PM 10/14/2004, Doug wrote:
>you just want a sum aof all attendees added as a column?  hmm...will
>this work in MySql?

My first thought reaction was "well, I can't do
that because because i'm joining three tables to
get all this data"

Then, my second thought reaction was "yeah, it
would be nice if all this stuff I wanted to add
was identifiable in one table"

And my third thought was "oh crap, it IS!"

I figured since I was already making a join of
three tables to get the other stuff, why not just
have it add up those columns while it was already
pulling that data? But then the query for what
I want is pretty simple, so I don't think it will
be an issue:

<cfquery name="inviteesYSum" DATASOURCE=#databaseName#>
     SELECT SUM(NumberOfAttendees) AS Attending
     FROM Invitee
     WHERE EventBelongID=#eventID#  AND
         Status='Y'
</cfquery>

Yeah, after you figure it out, it's easy. *grin*

Thanks Doug. :)

Anders
+===========================================================+
|Anders Green                 Email: [EMAIL PROTECTED]       |
|                              Home: 919.303.0218           |
|        Off Road Rally Racing Team: http://linaracing.com/ |
+===========================================================+
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to