Adding Selection Criteria 2
We can do the same thing for the rating drop-down list. Insert the following query into the indicated place in SearchResults.csp and our Search Results page is complete.
—Query—
Query
<script language="sql" name=FilmList>
SELECT ID, Description, Length, Rating, Title, Category->CategoryName
FROM Cinema.Film
WHERE PlayingNow = 1
#($SELECT(%request.Data("CategoryList",1) '= "*":
" AND Category = " _ %request.Data("CategoryList",1),
1:""))#
#($SELECT(%request.Data("RatingList",1) '= "*":
" AND Rating = '" _ %request.Data("RatingList",1)_"'",
1:""))#
ORDER BY Title
</script>