<!--- 
 Filename: MerchDetailProvider.cfm
 Author: Nate Weiss (NMW)
 Purpose: Provides film detail to a Flash movie
--->

<!--- We are expecting a MerchID parameter to be passed from Flash --->
<cfparam name="FLASH.merchID" type="numeric">

<!--- Query the database for merchandise records --->
<cfquery name="MerchQuery" datasource="#APPLICATION.dataSource#" maxrows="1">
 SELECT MerchID, MerchName, MerchDescription, ImageNameSmall, MerchPrice
 FROM Merchandise 
 WHERE MerchID = #FLASH.merchID#
</cfquery>

<!--- Format the MerchPrice column in the appropriate currency format --->
<!--- (It’s easier to do this with ColdFusion than with ActionScript) --->
<cfset merchQuery.merchPrice = lsCurrencyFormat(merchQuery.MerchPrice)>

<!--- This will be available as the “result” variable in the --->
<!--- MerchDetailProvider_Result handler within the Flash movie --->
<cfset FLASH.result = merchQuery>
