Well, I'll try this again (a link in outlook killed my first gmail reply)

First, build a sample of the output as you want it to look in plain
HTML. Get it right before you start.

Next, figure out the CF tags and functions that can help do this. This
is not by any means the best or only way, it just tries to follow the
logic you laid out in cf code. And it untested.
<table>
<cfset startDate="06/01/2005">
<cfset numberOfDaysInMonth=day(dateAdd("d",-1,dateAdd("m",1,startdate)))>
<cfloop index="d" from="1" to="#numberOfDaysInMonth#" step="1">
<cfset curDate=dateAdd("d",d-1,startDate)>
<tr><td>dateFormat(curDate,"Mmmm dd")#</td></tr>
<cfquery name="sessions" dbtype="query">select * from bigQuery where
sessionDate=#createODBCDate(curDate)#</cfquery>
<cfif sessions.recordCount gt 0>
<cfloop query="sessions">
<cfoutput><tr><td>#sessionStartTime# #sessionType#
#evaluate(sessionCapacity-sessionBooked)#</td></tr></cfoutput>
</cfloop>
<cfelse>
<tr><td>No sessions today</td></tr></cfif>
</cfloop>
</table>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:15:905
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to