<cfset COUNT_LIST = "">
<cfoutput query="BUILDINGS">
<!--- RUN A SUB QUERY TO COUNT THE ROOMS --->
<cfquery name="roomCOUNTER" datasource="term">
SELECT *
FROM Q_D2
WHERE ACTPRYSID = #BUILDINGS.PRYSID#
</cfquery>
<cfset COUNT_LIST = ListAppend(COUNT_LIST,
roomCOUNTER.recordcount, ",")>
</cfoutput>
regards
badalTyagi
HCL Perot Systems
Noida, India
-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 1:39 PM
To: CF-Talk
Subject: Re: Creating a list of myQUERY.recordcount
Les Mizzell wrote:
> Need to build a list of record counts....
>
> What's wrong with this?
>
> <cfoutput query="BUILDINGS">
>
> <!--- RUN A SUB QUERY TO COUNT THE ROOMS --->
> <cfquery name="roomCOUNTER" datasource="term">
> SELECT *
> FROM Q_D2
> WHERE ACTPRYSID = #BUILDINGS.PRYSID#
> </cfquery>
>
> <CFSET COUNT_LIST=ValueList(roomCOUNTER.recordcount)>
>
> </cfoutput>
How does the query Buildings look? You can probably do this more
efficient with a count/group by query.
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm