Eric, I spotted an error in my code. It should be '#cdjwebdoc.cdweb[x].internetdescription#' not '#cdjwebdoc.cdweb.[x].internetdescription#'.
Jeff -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 1:56 PM To: CF-Talk Subject: RE: How to access row in loop Thanks, I will give that a whirl!!! Regards, Eric J. Hoffman DataStream Connexion www.datastreamconnexion.com -----Original Message----- From: Jeff Battershall [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 12:46 PM To: CF-Talk Subject: RE: How to access row in loop Eric, You're missing the "item" attribute for looping over a collection. Currentrow is from a cfoutput or cfloop query loop, not from your collection. You also are missing pound signs on your collection attribute. It has to go like this: <cfloop collection="#cdjwebdoc.cdweb#" item="x"> <!---Check for existence of SKU----> <cfquery name="check" datasource="#dsn#"> Select id from inventory where sku = '#trim(cdjwebdoc.cdweb.[x].sku)#' </cfquery> <cfif check.recordcount EQ 1> <!--- IF SO, Update---> <cfquery name="updateinv" datasource="#dsn#"> Update inventory set intcontent = '#cdjwebdoc.cdweb.[x].internetdescription#', invtitle = '#cdjwebdoc.cdweb.[x].invoicedescription#', sellprice = #cdjwebdoc.cdweb.[x].internetsellfor#, sale = #cdjwebdoc.cdweb.[x].sale#, item_cost = #cdjwebdoc.cdweb.[x].unitcost#, inventory_minimum = #cdjwebdoc.cdweb.[x].minimuminventory# Where sku = '#trim(cdjwebdoc.cdweb.[x].sku)#' </cfquery> </cfloop> HTH, Jeff -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 12:22 PM To: CF-Talk Subject: How to access row in loop Here's my busted attempt to get certain items from a structure while looping through it...can someone tell me where I messed up? (structure is like this: cdjwebdoc.cdweb.1.sku cdjwebdoc.cdweb.1.unitcost cdjwebdoc.cdweb.2.sku and so on heres my busted attempt: How does a guy go about making that work?? Or am I in the wrong ballpark? Regards, Eric J. Hoffman DataStream Connexion www.datastreamconnexion.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4