This is my CFOUTPUT for the query
<table cellspacing="0" cellpadding="0">
<cfoutput query="getupcomingevents" group="coursestart">
<!---This is the first cell of the output, it contains the following
cell bg colour #FFFFFF for the date field
and the following bgcolour #F1EDE2 for the eventtitle and location
fields --->
<tr>
<!--- The following table row should display the name of the month ie
November 2001 of the events listed with an eventdate of november, if
there are events in December, January etc the same process with the
tables is repeated --->
<td bgcolor="##FFFFFF" align="center"></td>
<td width=5 bgcolor="##003063">
<img src="" width=5 height=1 border=0></td><td
bgcolor="##003063">
<span
class="events_all_category_title">#MonthAsString(Month(getupcomingevents
.coursestart))# #Year(getupcomingevents.coursestart)#</span></td>
<td bgcolor="##003063"><img border="0" src="" width="1"
height="20"></td>
</tr>
<tr>
<td width=580 height=1 bgcolor="##C5CBCB" colspan=4><img src=""> width=580 height=1 border=0></td>
</tr>
<cfoutput>
<tr>
<CFIF (CurrentRow MOD 2) IS 1>
<td width=42 bgcolor="##FFFFFF" align="center"><img
src="" width=42 height=1 border=0><br/>
<cfelse>
<td width=42 bgcolor="##F3F3F3" align="center"><img
src="" width=42 height=1 border=0><br/>
</cfif>
<span class="dark">#DateFormat(coursestart, "dd")#</span>
</td>
<td width=5 bgcolor="##EEE5CE">
<img border="0" src="" width="1" height="23"><img
src="" width=5 height=1 border=0></td>
<CFIF (CurrentRow MOD 2) IS 1>
<td width=303 bgcolor="##F1EDE2">
<img src="" width=248 height=1 border=0><br/>
<cfelse>
<td width=303 bgcolor="##EEE5CE">
<img src="" width=248 height=1 border=0><br/>
</cfif>
<a href=""> <http://intranet.neath-porttalbot.gov.uk/personnel/itec/coursedocs/#cour
sepath#">#coursetitle#</a> >
</td>
<CFIF (CurrentRow MOD 2) IS 1>
<td width=160 bgcolor="##F1EDE2"><img src="" width=215
height=1 border=0><br/>
<cfelse>
<td width=160 bgcolor="##EEE5CE"><img src="" width=215
height=1 border=0><br/>
</cfif>
<span class="events_subtitle">#duration# Day(s)</span>
</td>
</tr>
<tr>
<td width=580 height=1 bgcolor="##C5CBCB" colspan=4><img src=""> width=580 height=1 border=0></td>
</tr>
</cfoutput>
</cfoutput>
</table>
________________________________
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 16 July 2004 12:18
To: CF-Talk
Subject: RE: Problem with SQL WHERE clause and CF ???
User INNER JOIN!!!! Cant stand that awful syntax for joins..:-)
What DB flavour? You should be able to do all of this in SQL...and not
use
CF at all apart from output..
_____
From: Ian Vaughan [mailto:[EMAIL PROTECTED]
Sent: 16 July 2004 12:09
To: CF-Talk
Subject: Problem with SQL WHERE clause and CF ???
I am trying to display a list of upcoming events grouped together by
month. So for example it would show
July 2004
23 Windows Course
25 Word Course
August 2004
10 Windows Course
15 Excel Course
etc......................
When running the query shown at the bottom of the email it works as it
should, however when adding the following to the WHERE clause
AND
courseoutline.id = iteccourse.courseoutlineid
AND
iteccourse.courseoutlineid ='1'
it displays the results like
July 2004
23 Windows Course
July 2004
25 Word course etc.........................
<cfset MonthsToDisplay = 2>
<cfset BeginDate = "#Month(now())#/1/#Year(now())#">
<cfset EndDate = "#Month(DateAdd("m",
MonthsToDisplay,now()))#/#DaysInMonth(DateAdd("m",
MonthsToDisplay,now()))#/#Year(DateAdd("m", MonthsToDisplay, now()))#">
<cfquery name="getevents" datasource="in">
SELECT courseoutline.coursetitle, courseoutline.coursesummary,
courseoutline.coursepath, iteccourse.coursestart,
to_char(coursestart,'YYYY') AS eventYear, to_char(coursestart,'MM') AS
eventMonth, iteccourse.duration,
iteccourse.availability
FROM courseoutline, iteccourse
WHERE trunc(coursestart) BETWEEN
TO_DATE('#DateFormat(variables.Begindate,"dd/mm/yyyy")#','DD/MM/YYYY')
AND TO_DATE('#DateFormat(variables.Enddate,"dd/mm/yyyy")#','DD/MM/YYYY')
ORDER BY iteccourse.coursestart asc
</cfquery>
Any ideas on why this may be occuring ?
_____
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

