This is what I like about programming, even in parallel developing there is always more ways to skin the cat.
On 4/5/07, Steve Onnis <[EMAIL PROTECTED]> wrote: > > > Ok > > thought I would put my 2cents in here. I figured if you wanted to adapt > it > for more than 3 columns or less than 3 columns it would be silly to be > hard > coding in cells so here you go. > > <cfset query = queryNew("") /> > <cfset queryAddColumn(query, "column", > listToArray("1,2,3,4,5,6,7,8,9,10,11")) /> > <cfset columns = 3 /> > <cfset rows = CEILING(query.recordCount / columns) /> > > <cfoutput> > <table border="1"> > <cfloop from="1" to="#rows#" index="row"> > <tr> > <cfloop from="0" to="#columns-1#" index="cell"> > <td> > <cfif row + ((rows * cell)) LTE query.recordCount> > #query["column"][row + ((rows * cell))]# > <cfelse> > > </cfif> > </td> > </cfloop> > </tr> > </cfloop> > </table> > </cfoutput> > > > This will also fill any empty cells automatically > > Have fun > > Steve Onnis > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---