<!--- Get Ratings and associated films from database --->
<CFQUERY DATASOURCE="ows" NAME="GetRatedFilms">
  SELECT 
    r.RatingID, r.Rating,
    f.FilmID, f.MovieTitle
  FROM FilmsRatings r INNER JOIN Films f
  ON r.RatingID = f.RatingID  
  ORDER BY r.RatingID, f.MovieTitle
</CFQUERY>


<HTML>
<HEAD><TITLE>Using a Custom Tag</TITLE></HEAD>
<BODY>
<H2>Using a Custom Tag</H2>

  <!--- This Custom Tag will only work in a Form --->
  <FORM>

    <!--- Show Ratings and Films in Correlated SELECT lists --->
    <!--- via Custom Tag, which generates all needed script --->
    <CF_TwoSelectsRelated
      QUERY="GetRatedFilms"
      NAME1="RatingID"
      NAME2="FilmID"
      DISPLAY1="Rating"
      DISPLAY2="MovieTitle"
      SIZE1="5"
      SIZE2="5"
      FORCEWIDTH1="30"
      FORCEWIDTH2="50">
    
  </FORM>  
  
</BODY>
</HTML>
