There is soemthing about that approach that doesn't sit well with me. I know this is a stylistic issue. Decalring variables inside of a cfloop just raises hairs on the back of my neck. I think the only cf tags that I use inside of a cfquery really is cfif and maybe cfswitch. After that, I am opening up enterprise manager and starting up a stored procedure.
Again, it is style and not right or wrong. Teddy On 9/7/06, Jim Wright <[EMAIL PROTECTED]> wrote: > > >> <!--- UPDATE > >> ------------------------------------------ ---> > >> <!--- Loop over the number of records that were on the previous form > >> ---> > > Also, note that if you are using a DB that supports multiple SQL > statements, you can move the loop inside the cfquery and only have one > call to the db.... > > <!--- Loop over the number of records that were on the previous form > >---> > > <cfquery name="setQtystatus" datasource="print_shop"> > <cfloop from="1" to="#form.records#" index="ii"> > <cfset variables.thisId = form["fld_item_ID_"&ii]/> > <cfset variables.thisQuantity = form["fld_qty_shipped_"&ii]/> > update tbl_865_orders_items > set fld_qty_shipped = <cfqueryparam > value="#variables.thisQuantity#" > cfsqltype="cf_sql_varchar"/> > where fld_item_ID = <cfqueryparam value="#variables.thisId#" > cfsqltype="cf_sql_integer"/> > </cfloop> > </cfquery> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:252362 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

