|
<%
'Building SQL statement based on user selections
strSQL = "select * from Cars"
if Request.Form("make") <> "" or Request.Form("model") <> "" or Request.Form("range") <> "" or Request.Form("category") <> "" then
strSQL = strSQL & " where "
if Request.Form("make") <> "" then
strSQL = strSQL & "Make = '" & Request.Form("make") & "'"
strAnd = " and "
end if
if Request.Form("model") <> "" then
strSQL = strSQL & strAnd & "Model = '" & Request.Form("model") & "'"
strAnd = " and "
end if
if Request.Form("range") <> "" then
strSQL = strSQL & strAnd & "Price " & Request.Form("range")
strAnd = " and "
end if
if Request.Form("category") <> "" then
strSQL = strSQL & strAnd & "Category ='" & Request.Form("category") & "'"
end if
end if
set rsResults = objConn.Execute(strSQL)
'No results returned
if rsResults.EOF then
%>
<%
Else
Dim WhichColour
WhichColour = "#FFFFFF"
%>
<%
End If
%>
 |
 |
|
|