<% strCategory = Request("SelectCategory") strSubCategory = Request("SelectSubCategory") strCountry = Request("SelectCountry") strCity = Request("SelectCity") strKeyword = Request("Keyword") If strCategory = "ALL" Then strCategory = "%" End If If strSubCategory = "ALL" Then strSubCategory = "%" End If If strCountry = "" OR strCountry = "Any" Then strCountry = "%" End If If strCity = "" OR strCity = "Any" Then strCity = "%" End If If strKeyword = "" Then strKeyword = "" End If strSQLSearch = strKeyword If Request("Operator")= "Contains" then strSQLOperator = "LIKE '%" & strSQLSearch & "%'" Else strSQLOperator = "= '" & strSQLSearch & "'" End If 'strSQL = "SELECT * FROM tblAds WHERE cTitle " & strSQLOperator &" " strSql = "SELECT * FROM tblAds WHERE cCategory LIKE '" & strCategory & "'AND cSubCategory LIKE '" & strSubCategory & "'AND cCountry LIKE '%" & strCountry & "%'AND cCity LIKE '%" & strCity & "%'AND (cDescription " & strSQLOperator &" OR cShortDescription " & strSQLOperator &" OR cTitle " & strSQLOperator &") ORDER BY nAdID DESC" 'AND cDescription " & strSQLOperator &" " 'AND cDescription " & strSQLOperator &" " %>