here is what I would do
name all of the text boxes that are used to specify amounts similar to each
other.
with the primarykey part of the name
TEXTBOX_#primaryKey#
then loop the form colection
<cfloop list="#form.FIELNAMES#" index="x">
<cfif x CONTAINS "TEXTBOX_">
<cfquery name="someQuery" datasource="someDSN">
UPDATE TABLE
SET column = evaluate(x)
WHERE primarykey = #listLast(x, "_")#
</cfquery>
</cfif>
</cfloop>
let me know if you need any more clarification
-chris.alvarado
[application developer]
4|Guys Interactive, Inc.
------------------------------------
http://www.4guys.com
----- Original Message -----
From: "Bruce Sorge" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 3:57 PM
Subject: Re: mass database update
> Count is a quantity amount for an item, and ID is the ID primary key of
the
> item being updated. This is fed from a form that allows the user to
update
> inventory quantities for any number of items. Rather than go in and
update
> one item at a time, I want them to have the ability to do all the items
at
> once.
>
> ---------- Original Message ----------------------------------
> From: "Bryan Stevenson" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Tue, 15 Jan 2002 10:01:15 -0800
>
> # 5 needs more input....... ;-)
>
> What is the relationship between "count" and "ID" and where does "count"
ge
> t set?
>
> Bryan Stevenson
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> p. 250.920.8830
> e. [EMAIL PROTECTED]
> ---------------------------------------------------------
> Macromedia Associate Partner
> www.macromedia.com
>
> ----- Original Message -----
> From: "Bruce Sorge" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 15, 2002 3:54 AM
> Subject: mass database update
>
>
> > I am doing a mass update of a table. The query looks like this:
> > <cfloop index="thisItem" from=1 to=#listlen(ID)#>
> > <cfquery name="query_InsertItems" datasource="firehook1">
> > Update Inv1
> > Set Count = #Count#
> > Where ID = #ListGetAt(ID, thisItem)#
> > </cfquery>
> > </cfloop>
> >
> > What I am getting is this:
> > Update Inv1
> > Set Count = 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
> > Where ID = 2077
> >
> > I know that I have to associate a quantity (count) with an ID, but I am
> > not sure how to go about it. I tried nesting loops and creating arrays
> > and such with no luck.
> > Any assitance would be greatly appreciated.
> >
> > Thanks,
> >
> > _________________________________________
> > Bruce Sorge
> >
> >
> >
>
>
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists