One way to do it, but it can get ugly if any of the fields break to two
lines, then the table rows might not line up correctly. If that is the case
there are a few other ways to handle it...
<cfquery name="myquery">
SELECT
fname, lname, age
FROM
tbl_people
</cfquery>
<table>
<tr>
<td valign="top">
<!--- your field names table --->
<table>
<tr>
<td>First Name</td>
</tr>
<tr>
<td>Last Name</td>
</tr>
<tr>
<td>Age</td>
</tr>
</table>
</td>
<cfloop query="myquery">
<td valign="top">
<!--- record table --->
<table>
<tr>
<td>#fname#</td>
</tr>
<tr>
<td>#lname#</td>
</tr>
<tr>
<td>#age#</td>
</tr>
</table>
</td>
</cfloop>
</tr>
</table>
-----Original Message-----
From: Jay E Wigginton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 11:28 AM
To: CF-Talk
Subject: 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?
thanks
Jay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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