Hi i have this query below which works fine, i have 2 drop
down boxes which when selected i need it to change the query to
only show records where the column season and TeamID matches the
drop down values
i have tried this with no luck
AND
Season = <CFIF isdefined
("FORM.Years")>'#FORM.Years#'<CFELSE>
(Select Max(Season) From matchresults)
</CFIF> AND
TeamID = <cfif isdefined("Form.TeamName") and
Form.TeamName NEQ "">#Form.TeamName#</cfif>
so is a drop down box is selected the form will display
accordingly but i am getting funny results if nothing is selected
<cfquery name="GetResults" datasource="Cricket">
SELECT *
FROM matchresults MR, TeamNames TN, SeasonTable ST
WHERE MR.TeamID = TN.ID AND MR.Season = ST.SeasonID
</cfquery>