I'm building a form which inserts products into a database.

A basic form was done: Insert distributor, item, purchasePrice, MSRP,
salePrice, itemSize, itemColor (and so on).

OK, that was obvious.

I added to the form to allow the insertion of multiple items.

Qty [5]
Item [dress]

<cfloop from="1" to="#qty#">

        <cfquery></cfquery>

</cfloop>

I added to the form again. Instead of simply inserting a number of rows,
with each getting a unique ID, I now change the itemSize as well.

See below:

Item [dress]
Size From [6]
Size To [10]

<cfloop from="#itemSizeFrom#" to="#itemSizeTo#" step="2">

The insert loops 3 times and for each new record the field itemSize has a
different value (6,8,10).

Okie Dokie, now the question.

Now I have to add in non-numerical sizes: XS, S, M, L, XL.  On one hand that
should be no problem. Set XS to 101, S to 102 etc... And then use <cfif>

Here's the rub. This form is populating a database that is, among other
things, being merged by Microsoft Word to print price labels. Microsoft Word
doesn't have a repeating if-else. So the XS, S, M, L, XL must be inserted
into the db as XS, S, etc...

One could, I suppose, update the records after inserting them, but that
sounds dumb.

I've tried unsuccessfully using <cfset> to change the data. Anybody have any
clues?










~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to