<CFFUNCTION NAME="apparelColors">
<CFSET VAR aryColors = ArrayNew(1);
<CFLOOP Query="qQuery">
<CFSET ArrayAppend(aryColors,qQuery.your_col_name)>
</CFLOOP>
<CFRETURN aryColors>
</CFFUNCTION>
> Actually you can manipuate the query object inside you cfscript tag.
> You just cant't run the cfquery tag inside your cfscript. place the
> cfoutput around the cfscript and you should be good.
>
>
> Dwayne Cole, MS in MIS, MBA
> Florida A&M University
> Certified Advanced ColdFusion Developer
> 850-591-0212
>
> "It can truly be said that nothing happens until there is vision. But
> it is equally true that a vision with no underlying sense of purpose,
> no calling, is just a good idea - all "sound and fury, signifying
> nothing." The Fifth Discipline - Peter Senge
>
>
>
> ---------- Original Message ----------------------------------
> From: "Pascal Peters" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Sun, 28 Mar 2004 11:44:43 +0200
>
> >If you have one column of a recordset you want to convert to an array,
>
> >you can do
> >
> >ListToArray(Valuelist(qQuery.Column,"~"),"~")
> >
> >> -----Original Message-----
> >> From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED]
> >> Sent: zondag 28 maart 2004 1:56
> >> 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]

