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:
 
<cfloop collection="cdjwebdoc.cdweb">
  <!---Check for existence of SKU---->
  <cfquery name="check" datasource="#dsn#">
  Select id from inventory where sku =
'#trim(cdjwebdoc.cdweb.[currentrow].sku)#'
  </cfquery>
  <cfif check.recordcount EQ 1>
    <!--- IF SO, Update--->
    <cfquery name="updateinv" datasource="#dsn#">
    Update inventory set 
        intcontent = '#cdjwebdoc.cdweb.[currentrow].internetdescription#',
        invtitle = '#cdjwebdoc.cdweb.[currentrow].invoicedescription#', 
        sellprice = #cdjwebdoc.cdweb.[currentrow].internetsellfor#,
        sale = #cdjwebdoc.cdweb.[currentrow].sale#, 
        item_cost = #cdjwebdoc.cdweb.[currentrow].unitcost#,
        inventory_minimum = #cdjwebdoc.cdweb.[currentrow].minimuminventory#
     Where
        sku = '#trim(cdjwebdoc.cdweb.[currentrow].sku)#'

    </cfquery>

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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to