well then, you should name the count field on the form something like
count_appendProductID. then when you do the insert you could do something
like:

Update Inv1
        Set Count = #evaluate("form.Count_"  & ID)#
        Where ID = #ListGetAt(ID, thisItem)#

hope that helps :)

phillip

-----Original Message-----
From: Bruce Sorge [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 4: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
>
>
>


______________________________________________________________________
Get Your Own Dedicated Windows 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=coldfusionb
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