<!--- 
  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#">
  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 --->
<cfsavecontent variable="Flash.result">
  <cfoutput query="searchQuery">
    <p><b>#MovieTitle#</b><br>#Summary#<br></p>
  </cfoutput>
</cfsavecontent>
