What about this:
<cfquery name="calendar">
SELECT
id, event_date, month(event_date) as theMONTH, event_name, event_pic
FROM stpaul_events
WHERE month(event_date) >= #month(now())#
and month(event_date) < #threemonths#
ORDER BY event_date ASC
</cfquery>
<cfset counter = 1>
<cfoutput query="calendar" group="theMONTH">
<h4>#LSDateFormat(calendar.event_date,'MMMM - YYYY')#</h4>
<div id="eventBODY">
<cfoutput>
<cfif
counter NEQ 1 AND
Day(calendar["event_date"][counter]) NEQ
Day(calendar["event_date"][counter - 1])
>
<cfset myCSS = "eventWHITE">
<cfelse>
<cfset myCSS = "eventYELLOW">
</cfif>
<div class="#myCSS#"> - Lots of stuff here - </div>
<cfset counter = 1>
</cfoutput>
</div>
</cfoutput>
-----Original Message-----
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: 29 March 2005 00:57
To: CF-Talk
Subject: Re: Alternating Row Colour - Sorta
Here's the whole code block for reference. It displays three months of
events at a time:
QUERY:
<cfquery name="calendar">
SELECT
id, event_date, month(event_date) as theMONTH, event_name, event_pic
FROM stpaul_events
WHERE month(event_date) >= #month(now())#
and month(event_date) < #threemonths#
ORDER BY event_date ASC
</cfquery>
OUTPUT BLOCK
<cfoutput query="calendar" group="theMONTH">
<h4>#LSDateFormat(calendar.event_date,'MMMM - YYYY')#</h4>
<div id="eventBODY">
<cfoutput>
<cfif CurrentRow NEQ 1 AND Day(calendar["event_date"][CurrentRow])
NEQ Day(calendar["event_date"][CurrentRow - 1])>
<cfset myCSS = "eventWHITE">
<cfelse>
<cfset myCSS = "eventYELLOW">
</cfif>
<div class="#myCSS#"> - Lots of stuff here - </div>
</cfoutput>
--
-----------
Les Mizzell
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200321
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54