At 12:04 PM 10/14/2004, Donna wrote:
>everyone ... has fried their brains on code

I'm working on this:

<cfquery name="inviteesY" DATASOURCE=#databaseName#>
     SELECT a.firstname, a.lastname,p.AbbreviateMyFirstName, i.Comment,
i.NumberOfAttendees, p.PhotoLink
     FROM (Invitee i INNER JOIN AddressBook a
          ON i.EventBelongID=#eventID# AND
          i.AddressBookTargetID=a.ID)
          LEFT OUTER JOIN Person p
             ON p.ID = a.PersonTargetID
     WHERE i.Status = 'Y'
</cfquery>

Query works properly, but I want to get a sum
of one of the columns, and MySQL only wants to
sum groups, and this query has no groups.

That is, I want to add SUM(i.NumberOfAttendees)
to the list of things selected.

Uh, so yes, the list is working. *grin*

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