Morgan, this should do it

<cfset yourlist = "colname1,colname4,colname3">
<cfquery name="yourQuery" ...>
...</cfquery>

<cfloop query="yourQuery">
<cfloop list="#yourlist#" index="oneCol"> <!--- this forces your desired
order --->
    <cfoutput>#yourQuery.oneCol[currentRow]#<br></cfoutput>
</cfloop>
</cfloop>

-----Original Message-----
From: Morgan Senkal [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 12:49 PM
To: CF-Talk
Subject: Query manipulations...

I have the following situtation:

I receive a comma-delimited list of column names.  I need to output a query
which follows the ORDER of the columns in that list.  The items in the list
contain the same names as the column names in the query.  If queries were
structures, it would be cake...but alas they are not!

Using CF5.

Any help is appreciated, been banging my head on my monitor for a couple
days on this one...

Thanks in advance!!!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to