Picked this up from net..but Should give you an idea atleast of how to solve
your brain teaser. Assuming you have the images in an order in the database
defined by say column 'sequence'-
Say your query set_count gets the number of records for the images in database
then:
<CFSET max_seq = #set_count.recordcount#>
<CFSET max_rows = INT((#max_seq# +4)/5)>
<CFSET x = 0>
<TABLE>
<CFLOOP INDEX="seq_no" FROM="1" TO="#max_rows#">
<TR>
<CFLOOP INDEX="sequence" FROM="1" TO="5">
<CFSET x = x + 1>
<CFQUERY NAME="populate" DATASOURCE="xyz">
SELECT * FROM logo_info
WHERE sequence = #x#
ORDER BY sequence
</CFQUERY>
<TD>
<CFOUTPUT QUERY="populate"> #seq_no#: #name#</CFOUTPUT>
</TD>
</CFLOOP>
</TR>
</CFLOOP>
</TABLE>
Thanks.
-Sandy Vohra
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies
around the world in government. Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3030
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15