Since I am not sure if I understood this completely, so am not sure if
you can get all this by firing a single query but my guess would be its
possible.
Else execute a cfquery and fetch the records from one table and then
loop through the results of this query and fire another CFQUERY fetching
names and counts from other table..
Something like this if not exactly the same..
<CFQUERY name=Query1 datasource=dsn>
Select * from table1
</CFQUERY>
<CFLOOP Query=Query1>
<CFQUERY name=Query2 datasource=dsn>
Select * from table2 where field2=#table1.field1#
</CFQUERY>
</CFLOOP>
Thanks.
-Sandy Vohra
-----Original Message-----
From: Nick G [mailto:[EMAIL PROTECTED]
Sent: Friday, January 05, 2007 2:33 PM
To: CF-Newbie
Subject: Multidimensional Arrays??
Here is an overview of what I'm trying to solve.
Records are selected based on meeting two criteria. Within each selected
record there is a region field. This region field is not unique in the
table. Region is used to join another table with an associated field
called siteid which is unique to the second table. Also in the second
table is a field called service area. There are 3 service areas (West,
Central, East). Each service area has several hundered unique siteid. I
need to count how many records are associated with both the service area
and site id. Since there are several hundered siteid. I figured using a
multidimensional array to load the siteid, search though it and add a 1
for every instance it occurs. Is this the best way to go about tackling
this? Any suggestions, comments, examples, etc would be stellar. Thank
you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2395
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15