The last e-mail had the wrong version of what I was working on.  Here is the
most recent version

-----Original Message-----
From: Matthew Fusfield [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 7:01 PM
To: CF-Talk
Subject: RE: setting values


You could do this with two tables in your database and do a join. This is
probably best as the data will be consistant no matter how you access it.

A good way to do this with CF is to create a structure like this:

<cfscript>
Prices=StructNew();
Prices.A=19.95;
Prices.B=21.95;
Prices.C=22.95;
...
...
...

</cfscript>


You could then reference the actual prices by #Prices.A#

Again, a database join might be a better solution but the above will be
functional.

Matt



-----Original Message-----
From: Ken Ketsdever [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 9:32 PM
To: CF-Talk
Subject: setting values


 Friday, May 18, 2001 5:14 PM



I have a table that is dynamically populated from a db to show the item
number, description, price and image of products.

Although there are several hundred items there are only about 6 prices.

Rather than inputting the price of each item into the database, I would
prefer to put a letter designation then set the letter to equal a price. so
that when prices change I only have to reset the price once per price versus
changing all the prices in my database.

I am pulling out #price# from a query.

if I use prices as a , b, c, d, ...

can I use some sort of set function to establish prices to be displayed

so if an item has a price code of "a" in the database it will display $22.00

if it is "b" then it will display $26.00

etc...
Or does this need to be done via a cfif statement and if so how would I do
it


Thank you for any help you can provide
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to