use something like this: (probably a simplier way but too early and no
caffine...)

<cfset tdCounter = 0>
<tr>
<cfoutput query="q">
 <cfif currentrow mod 4>
  <!--- end row --->
  <cfset tdCounter = 0>
  </tr>
  <!--- start the next row --->
  <tr>
 <cfesle>
  <td><!--- some data here ---></td>
  <cfset tdCounter = tdCounter + 1>
 </cfif>
</cfoutput>
<cfset remainingTDs = 4 - tdCounter>
<cfif remainingTDs neq 0>
 <cfloop index=x from=1 to=remainingTDs>
  <td><!--- blank TD ---></td>
 </cfloop>
 </tr>
</cfif>

On Thu, Oct 9, 2008 at 3:10 PM, Toby King <[EMAIL PROTECTED]> wrote:

> >I usually just do a cfoutput and use the MOD operator like this to end the
> >row:
> ><cfif currentrow MOD 4>
> ></tr>
> ></cfif>
> >But then you may need to add a counter in there to fill in the needed
> <td>s
> >for when the last row doesn't have 4 records. It's been awhile since I've
> >done it.
> >
> >
> >On Thu, Oct 9, 2008 at 7:51 AM, Toby King <[EMAIL PROTECTED]> wrote:
> >
> >>
>
>
> Hi there
>
> I was trying to do this at 2 am so was a bit tired.  Still havent fixed the
> bug yet.  I remember that I think I picked that piece of code up from some
> CF forum but for the life of me I cant find it again.  The forum has loads
> of CF examples and tutorials and this was one of them.
>
> Does anyone have any ideas of what forum it may come from - thanks in
> advance if anyone can suggest the forum.  It isnt easycfm it is another one.
>  I think for memory the website where it came from had a mostly blue page
> background - ok not a lot to go from.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313707
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to