you can also do it cf-only way:

<cfquery ...>
SELECT
    emailID,
    emailADDRESS,
    emailDATE,
    groupID
  FROM log_email
  WHERE emailID = <cfqueryparam value="#trim(url.emailID)#"
        cfsqltype="CF_SQL_INTEGER" />
  ORDER BY emailDATE DESC
</cfquery>

<cfoutput query="thisLOG" group="emailDATE">
<cfset thisCOUNT = 0>
<cfoutput><cfset thisCOUNT = thisCOUNT+1></cfoutput>
   #thisCOUNT# emails sent on #thisLOG.emailDATE#
    <cfoutput>
      #thisLOG.emailADDRESS#<br>
    </cfoutput>
</cfoutput>

not as efficient as db way, but works too...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Les Mizzell wrote:
> Adrian Lynch wrote:
>   
>> You need to include the other columns in your SELECT in your GROUP BY
>> clause.
>>     
>
> When I do that, the group count is always "1"
>
> I'm using a second query right now, but there's got to be a more compact 
> way...
>
>
>   
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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-talk/message.cfm/messageid:322217
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to