let's say "script_type" is the name of a field from the table that u've 
selected in the query (it contains the name of the script downloaded), and 
script_time is the number of times thye've been downloaded


<CFOUTPUT query="myquery" GROUP="script_type">
#scriptype# - Downloaded #script_time# times<br>
</CFOUTPUT>





>From: "Josh R" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: Listing items and counts - I'm stuck
>Date: Thu, 26 Jul 2001 20:57:30
>
>What's the easiest way to output a list of items plus the number of times
>they're listed?
>I want an output like
>Item - (count)
>
>For example:
>
>I have three downloadable scripts listed in my database. I have one table
>that lists the item and each time it was downloaded (along with other info,
>but those are the parts that matter)
>
>I want to query the list so I can output something like:
>cfx_coolscript - Downloaded 23 times
>cfx_coolscript2 - Downloaded 154 times
>cfx_coolscript3 - Downloaded 1 time
>
>Is it possible to create a list and a count in a single query?
>
>I'm aware of creating an incremental count field in the database and simply
>displaying the value, but I want to know if there's some query/math 
>solution
>too.
>
>Thanks.
>
>================================
>Josh - [EMAIL PROTECTED]
>================================
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to