I have a problem and I'm guessing that a simple structure is my answer but I
have never done one before so here I am. I need to access a price based
upon an item number. Do I query the table to get my item id and price then
loop over the query and create a structure, or more accurately I guess a set
of structures so when I need a price I can just use #itemid.price#? If so
how do I execute this?
My thought was something like this:
<cfloop query = "getInventory">
<cfset oldPrice[#item_id#] = structNew()>
<cfset oldPrice[#item_id#].price = #price#>
</cfloop>
This of course does not work. I will have an item id at the location where
I need to display the price so I was thinking that my output could be
#Evaluate("oldPrice#item_id#.price")#
Am I even close?
Any assistance would be greatly appreciated.
Chris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at
http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4