cfqueryparam would be a good place to start

~Dave the disruptor~ 

----------------------------------------
From: Will Tomlinson <[EMAIL PROTECTED]>
Sent: Wednesday, May 25, 2005 8:00 PM
To: CF-Talk <cf-talk@houseoffusion.com>
Subject: tightening up my cart code 

On my shopping cart app, I've gotten through the payment processing part and 
now I'm entering the data into two tables. I'm using Nate's example from WACK. 
Does anyone have any suggestions on improving this code? It works but I want to 
improve it, and I've never used cftransaction before. 
In this example, ListFirst(cfhttp.filecontent)is the value returned from 
authorize.net. 1 - approved, 2- declined, 3- error

Thanks much,
....cf Will

INSERT INTO tblorders 
(orderID, orderdate, contactFname, contactLname, shipaddress1, shipaddress2,
shipcity, shipstate, shipzip, shipcountry, shipphone, shipemail, billingfname,
billinglname, billingaddress1, billingaddress2, billingcity, billingstate,
billingzip, billingcountry, billingphone, billingemail, shopperID, notes)
VALUES ('#VARIABLES.invoicenumber#', '#VARIABLES.invoicedate#', 
'#shopperinfo.s_fname#', '#shopperinfo.s_lname#',
'#shopperinfo.s_address1#','#shopperinfo.s_address2#', '#shopperinfo.s_city#', 
'#shopperinfo.s_state#',
 '#shopperinfo.s_zip#', '#shopperinfo.s_country#', '#shopperinfo.s_phone#', 
'#shopperinfo.s_email#',
'#shopperinfo.b_fname#', '#shopperinfo.b_lname#', '#shopperinfo.b_address1#', 
'#shopperinfo.b_address2#',
'#shopperinfo.b_city#', '#shopperinfo.b_state#', '#shopperinfo.b_zip#', 
'#shopperinfo.b_country#', 
'#shopperinfo.b_phone#', '#shopperinfo.b_email#', #shopperinfo.custID#, 
'#ATTRIBUTES.comments#')

INSERT INTO tblorderitems 
(orderID, prodID, prodqty, prodsellprice)
VALUES ('#VARIABLES.invoicenumber#', '#i#', #sc[i].qty#, #sc[i].price#)

Working on this part now



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207706
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to