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

<!--- Retrieve Films and Related Actors from database --->
<cfquery name="getFilmInfo" datasource="#APPLICATION.DataSource#">
 SELECT 
 Films.FilmID, Films.MovieTitle, 
 FilmsActors.ActorID
 FROM Films, FilmsActors
 WHERE Films.FilmID = FilmsActors.FilmID
 ORDER BY Films.MovieTitle
</cfquery>

<html>
<head><title>Films and Actors</title></head>
<body>
<h2>Films And Actors</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="Actor ID" text="#ActorID#">
</cftable>

</body>
</html>
