You do an array loop through the query using writeOutput()
something like this should work:
for(i = 1; i lt myQuery.recordCount; i = i + 1){
writeOutput(myQuery.myColumn[i] & '<br>');
}
-----Original Message-----
From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 27, 2004 7:56 PM
To: CF-Talk
Subject: Query Output in a cfscript
I have an object for an apparel item. This item may come in 10 different
colors. I have a db table which will have an entry for each color
associated with an item (referenced by the item id and the color id).
When initializing my apparel item I want to have a property of colors.
This would be an array of color objects. I can easily query the db to
get the recordsets associated with the item, but how would I loop
through the recordset within a <cfscript> block? Can you place a
<cfoutput> tag inside a <cfscript> block?
Cutter
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Query Output in a cfscript Cutter (CF-Talk)
- Re: Query Output in a cfscript Tim Heald
- Re: Query Output in a cfscript Cutter (CF-Talk)
- Re: Query Output in a cfscript Cutter (CF-Talk)
- RE: Query Output in a cfscript Pascal Peters
- RE: Query Output in a cfscript Dwayne Cole
- Re: Query Output in a cfscript Chris Wigginton
- RE: Query Output in a cfscript Pascal Peters