Thanks... that works great!

Jay

-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 1:34 PM
To: CF-Talk
Subject: RE: Display Query Horizontally


> I have been trying to determine a way to display query's record set
> horizontally oriented rather than vertically oriented and maintain proper
> column and row alignment... example:
>
> <space> Record1 Record2 Record3 Record4
> field1   R1-F1   R2-F1   R3-F1   R4-F1
> field2   R1-F2   R2-F2   R3-F2   R4-F2
> field3   R1-F3   R2-F3   R3-F3   R4-F3
>
> Is there a simple means of doing this?

<cfset FieldList="Field1,Field2,Field3">
<table border=0>
        <tr>
                <td></td>
        <cfloop index="i" from=1 to="#myQuery.RecordCount#">
                <td>Record #i#</td>
        </cfloop>
        </tr>
<cfloop index="i" list="#FieldList#">
        <tr>
                <td>#i#</td>
        <cfloop query="myQuery">
                <td>#Evaluate(i)#</td>
        </cfloop>
        </tr>
</cfloop>
</table>

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to