Hey there, This seems to work, is it the best way? I read somewhere I should avoid the evaluate function.
Thanks, Mark <cfloop index="i" from="1" to="#paintListRecordCount#"> <cfif isdefined ("form.ceilingpaint#i#")> ceiling #i# is defined <br> <cfquery name="ceiling" datasource="mdfinish"> UPDATE Areas SET CeilingPaint = #evaluate("form.ceilingpaint#i#")# where areaId = #evaluate("form.ceilingAreaId#i#")# </cfquery> </cfif> </cfloop> -----Original Message----- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 11:20 AM To: CF-Talk Subject: green and seemingly brain dead, please help Hey there, In the body of a <cfloop>, this works: <cfif isdefined ("form.ceilingpaint#i#")>. Do I need to use the evaluate function to get the value of that same variable for use in an update query? What is the correct way to write the <cfquery> below. Thank you very much. Mark <cfloop index="i" from="1" to="#paintListRecordCount#"> <cfif isdefined ("form.ceilingpaint#i#")> ceiling #i# is defined <br> <cfquery name="ceiling" datasource="mdfinish"> UPDATE Areas SET CeilingPaint = #form.ceilingpaint + i# where areaId = #form.ceilingareaId + i# </cfquery> </cfif> </cfloop> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219246 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