You are checking for the currentrow outside of the 'inner' cfoutput.

What this means is that the 'table header' will ONLY activate IF the new
'id' happens to also be a factor of 10.

I am not certain how it is that you want to have this information displayed,
it looks like you are wanting 2 columns of date/location information and
then have it break every 10, but this code won't get you there.  

If you post an example of how you want the results to display, I can help
you get it there.

-- 
William E. Seiter
 
Have you ever read a book that changed your life?
Go to: www.winninginthemargins.com
Enter passkey: goldengrove
 
Web Developer / ColdFusion Programmer
http://William.Seiter.com

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 03, 2008 10:46 AM
To: CF-Newbie
Subject: Repeating table header

How do I repeat a table header every 10 rows or so? I've tried using MOD, 
but it doesn't display my table header every 10 rows; it seems to display 
it more randomly. Thanks!

<cfoutput query="query" group="id">

<table>
<p><a href = "#query.Weblink#"><strong>#query.id# - 
#query.myName#</strong></a></p>

<td><p><cfoutput><cfif month(query.myDate) EQ 
month(now())>#DateFormat(query.myDate, 'dd')#<cfif 
#dateformat(dateadd("d", query.Days-1, query.myDate), "dd")# EQ 
#dateformat(query.myDate, "dd")#><cfelse>-#dateformat(dateadd("d", 
query.Days-1, query.myDate), "dd")#</cfif> - 
#query.Location#<br></cfif></cfoutput></p></td>
 
<td><p><cfoutput><cfif month(query.myDate) EQ month(now()) + 
1>#DateFormat(query.myDate, 'dd')#<cfif #dateformat(dateadd("d", 
query.Days-1, query.myDate), "dd")# EQ #dateformat(query.myDate, 
"dd")#><cfelse>-#dateformat(dateadd("d", query.Days-1, query.myDate), 
"dd")#</cfif> - #query.Location#<br></cfif></cfoutput></p></td>  
</table> 

<cfif query.currentrow EQ 1 OR query.currentrow mod 10 EQ 0> 

<table width = "100%" border="0" align="center" cellpadding="2" 
cellspacing="0">
<tr>
<td><table width="100%"  border="0" cellpadding="1" cellspacing="1">
<tr bgcolor="003399">
<cfset setlocale("Portuguese (Brazilian)")>
<td>#MonthAsString(month(now()))#</td>
<td>#MonthAsString(month(now()) + 1)#</td>
</tr>
</table>
</td>
</tr>
</table>
</cfif>
</cfoutput>



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

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3373
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to