Hi. Small problem. I have a search page. On it I have search by Country and by City. If both fields are filled in there's no problem. If just one is filled in it still looks for two. e.g. I search for the country "Kenya" but don't enter anything on the form for city, then even if I have 50 entries in my Database for Kenya, it will only return the records that have "Kenya" for country and a null value for a city.
How do I get it to bring up All records where Country="Kenya" even if City=Null?
This SQL code doesn't do the job:
<CFQUERY Name="DiveSearch" DATASOURCE="DiveSchools">
Select *
From DiveData
Where Country='#Country#' AND City='#City#'
</CFQUERY>
Thanks.
How do I get it to bring up All records where Country="Kenya" even if City=Null?
This SQL code doesn't do the job:
<CFQUERY Name="DiveSearch" DATASOURCE="DiveSchools">
Select *
From DiveData
Where Country='#Country#' AND City='#City#'
</CFQUERY>
Thanks.