Bruce,

If all your text fields on your form are named count then when you put
data in them and submit the form all the fields with the same name are
concatenated together to form a comma seperated list of the values
submitted.

What I'd suggest is naming the fields count#ID# or something that will
make then unique and identifiable on the action page.  This will
separate out their values individually for processing.  Another option
would be to use your listGetAt() for your count variable as well,
because it is a list too.  So you have two options I guess.

HTH,

Tyler M. Fitch
Certified Advanced ColdFusion 5 Developer

ISITE Design, Inc.



-----Original Message-----
From: Bruce Sorge [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 15, 2002 1:57 PM
To: CF-Talk
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

Reply via email to