You can view the results of a Query as an array.
 
So your query...
 
<CFQUERY NAME="test" DATASOURCE="ReservationSystem">
SELECT      date_num
FROM         dbo.DatesTimes
Where class_num = 4;
</CFQUERY>
 
If test.recordcount is greater than 0, you can access the results by using the following syntax.
 
test.date_num[???]
 
Where ??? is a number between 1 and test.recordcount
 
Randy Ellis
-----Original Message-----
From: Adaryl Wakefield [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 3:37 PM
To: [EMAIL PROTECTED]
Subject: [KCFusion] arrays and querys

Ok so after a bit of guess work this is what I came up with:
 
<CFQUERY NAME="test" DATASOURCE="ReservationSystem">
SELECT      date_num
FROM         dbo.DatesTimes
Where class_num = 4;
</CFQUERY>
 
<cfset date_nums = ArrayNew(1)>
<cfloop query="test">
<cfset date_nums[test.currentRow] = date_num>
</cfloop>
 
Is it possible to make this more efficient or elegant (i.e. professional)?
Adaryl

Reply via email to