Hi

I have a documents table and a categories table, each record in the
documents table is assigned a category from the categories table
(documents.sub_cat = categories.catno)

What query would I use to count the number of documents within each
category

i.e. 

Category 1 (25 Records)

Category 2 (35 Records)

This is my query that brings back the category names from the database
at present

<CFQUERY name="query" datasource="datasource">
SELECT catno, category, cat_desc, parent_level 
from categories
where parent_level =#URL.catno#
</CFQUERY>


Any ideas would be most welcome


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275568
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