<!--- 
 Filename: SimpleSearchProvider.cfm
 Author: Nate Weiss (NMW)
 Purpose: Provides a simple film search service for a Flash MX movie
--->

<!--- We are expecting a SearchString parameter from Flash --->
<cfparam name="FLASH.searchstring" type="string">

<!--- Query the database for any matching film records --->
<cfquery name="searchQuery" datasource="#APPLICATION.dataSource#" maxrows="1">
 SELECT *
 FROM Films
 WHERE MovieTitle LIKE '%#FLASH.searchstring#%'
</cfquery>

<!--- Set the FLASH.Result variable to the summary of the returned film --->
<!--- This will be available as the “result” variable in the --->
<!--- SimpleSearchProvider_Result handler within the Flash movie --->
<cfset FLASH.result = searchQuery.summary>
