<cfloop from="1" to="#form.records#" index="Qty">
<cfset qtyShippedStr = "fld_qty_shipped" & Qty>
<cfset qtyShippedVal = form[qtyShippedStr]>
<cfset fldItemStr = "fld_item_ID" & Qty>
<cfset fldItemVal = form[fldItemStr]>
<cfquery name="setQtystatus" datasource="print_shop">
update
tbl_865_orders_items
set
fld_qty_shipped = <cfqueryparam value="#qtrShippedVal#"
cfsqltype="cf_sql_integer">
where
fld_item_ID = <cfqueryparam value="#fldItemVal#"
cfsqltype="cf_sql_integer">
</cfquery>
</cfloop>
On 9/7/06, Teddy Payne <[EMAIL PROTECTED]> wrote:
>
> Are you using evaluate because you are trying to get the value of a form
> field with the name of the loop iterate plus another field name?
>
> Teddy
>
> On 9/7/06, Web Master <[EMAIL PROTECTED]> wrote:
> >
> > I have never tried to update multiple records before, if there is a
> > better way I can rewrite the pages.
> >
> > this is the error I got with your suggestion.
> >
> > Invalid CFML construct found on line 1 at column 5.
> > ColdFusion was looking at the following text:
> > ,
> >
> >
> > The error occurred in
> > E:\intranet_development\formsDynamic\print_shop\printJobRequestStatusUpdate.cfm:
> > line 23
> > Called from
> > E:\intranet_development\formsDynamic\print_shop\printJobRequestStatusUpdate.cfm:
> > line 11
> > Called from
> > E:\intranet_development\formsDynamic\print_shop\printJobRequestStatusUpdate.cfm:
> > line 1
> > Called from E:\intranet_development\index.cfm: line 17
> >
> > 21 : update tbl_865_orders_items
> > 22 : set fld_qty_shipped = 'evaluate(#FORM.fld_qty_shipped# &
> > #Qty#)'
> > 23 : where fld_item_ID = #evaluate(FORM.fld_item_ID & Qty)#
> > 24 : </cfloop>
> > 25 : </cfquery>
> >
> >
> > Thank You,
> > Keith
> >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252346
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4