<!---
Name:        ratings2.cfm
Author:      Ben Forta (ben@forta.com)
Description: Query output grouping
Created:     4/1/01
--->

<!--- Get movie list from database --->
<CFQUERY NAME="movies" DATASOURCE="ows">
SELECT MovieTitle, RatingID
FROM Films 
ORDER BY RatingID, MovieTitle
</CFQUERY>

<!--- Create HTML page --->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Orange Whip Studios - Movies by Rating</TITLE>
</HEAD>

<BODY>

<!--- Display movie list --->
<TABLE>
<!--- Loop through ratings --->
<CFOUTPUT QUERY="movies" GROUP="RatingID">
<TR VALIGN="top">
<TH>
 #RatingID#
</TH>
<TD>
 <!--- For each rating, list movies --->
 <CFOUTPUT>
 #MovieTitle#<BR>
 </CFOUTPUT>
</TD>
</TR>
</CFOUTPUT>
</TABLE>

</BODY>
</HTML>

