<!--- 
 Filename: FilmRatings.cfm
 Created by: Nate Weiss (NMW)
 Purpose: Demonstrates use of SQL outer joins
--->

<!--- Retrieve Films and Related Actors from database --->
<cfquery name="getFilmInfo" datasource="#APPLICATION.dataSource#">
 SELECT 
 f.FilmID, f.MovieTitle, 
 r.Rating
 FROM Films f LEFT OUTER JOIN 
 FilmsRatings r ON f.RatingID = r.RatingID
 ORDER BY f.MovieTitle
</cfquery>

<html>
<head><title>Film Ratings</title></head>
<body>
<h2>Film Ratings</h2>

<!--- Display retrieved information in HTML table --->
<cftable query="getFilmInfo" htmltable border colheaders>
 <cfcol header="Film ID" text="#FilmID#">
 <cfcol header="Film Title" text="#MovieTitle#">
 <cfcol header="Rating" text="#Rating#">
</cftable>

</body>
</html>
