Hi guys,

I've got a problem whereby I'm trying to reference my looped variable in an
SQL statement.

            <!-- Update the answers in the database -->
            <cfloop index="i" from="1" to="#CheckQuestions.recordCount#">
            <cfquery name="UpdateAnswers" datasource="user020">
            UPDATE tbl_020publicQuestions
            SET answer = '#form.answer##i#'
            WHERE interviewID = #CheckInterview.interviewID[i]#
            </cfquery>
            </cfloop>


My problem appears to be the line SET answer = '#form.answer##i#' - any
ideas how I can get this to work? In my form I had answers put into a loop
(answer1 answer2 answer3 etc).

Thanks,

Saturday




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:203892
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to