Try this, you might be surprised how flexible and simple it is
<!--- Change this around to however many images you want to spoof from the
query,
Only used for the example --->
<cfset ImagesInQuery = 15>
<!--- This is a value you might actually want.
Change this for however many you would display --->
<cfset CellsPerRow = 4>
<!--- Spoof a query --->
<cfset MyQuery = querynew("image")>
<!--- make some rows and set the cells in the query --->
<cfloop from="1" to="#ImagesInQuery#" index="x">
<CFSET newRow = QueryAddRow(MyQuery, 1)>
<CFSET temp = QuerySetCell(MyQuery, "image", "#x#", x)>
</cfloop>
<table border="1">
<tr>
<cfoutput query="MyQuery">
<td>Image #image#<!--- Replace with img src ---></td>
<cfif MyQuery.currentrow mod CellsPerRow eq 0></tr><tr></cfif>
</cfoutput>
<cfif MyQuery.recordcount mod CellsPerRow neq 0>
<cfset current_cell = MyQuery.recordcount>
<cfset addcell = 0>
<cfscript>
while (current_cell mod CellsPerRow neq 0)
{
addcell = addcell + 1;
current_cell = current_cell + 1;
}
</cfscript>
<cfloop from="1" to="#addcell#" index="x">
<td>Empty</td>
</cfloop>
</cfif>
</tr></table>
-----Original Message-----
From: ibtoad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 4:37 PM
To: CF-Talk
Subject: Multiple columns???
How can I set an output query to display thumbnails in more than one column
of a table? I would like 2 or 3 columns.
Thanks,
Rich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists