Hi i have the query below which is ok, but i need to have a
default value for SESSION.year5, the problem i have is i need the
default vale to be "MAX GetResults.MR.Season" not sure how to enter
this into my code, do i add it to the cfparam default or efelse the
session
<cfparam name="SESSION.TeamName5" type="string"
default="">
<cfparam name="SESSION.Year5" type="string" default="">
<cfif isdefined ("FORM.Years")>
<cfset SESSION.Year5 = FORM.Years>
</cfif>
<cfquery name="GetResults" datasource="Cricket">
SELECT *
FROM matchresults MR
INNER JOIN
TeamNames TN
ON MR.TeamID = TN.ID
INNER JOIN
SeasonTable ST
ON MR.Season = ST.SeasonID
WHERE
0=0
<CFIF SESSION.TeamName5 IS NOT "">
AND
(MR.TeamID = '#SESSION.TeamName5#')</CFIF>
<CFIF SESSION.Year5 IS NOT "">
AND
(MR.Season = '#SESSION.Year5#')</CFIF>
</cfquery>