Dynamic form values using CFvariable
Posted on 2000-05-02
I am creating a form with 6 names and 30 different values. I will use this form to tally votes to a particular question. Currently I have created a cfquery that works within the Query Builder but not when using the form. The Database will be driven by the ID value and then increase the corresponding vote section by 1.
I need to have the CFvariable select the value statement of the radio button and then run the cfquery stated below.
Form value Database ID # of Votes
1 1 0
2 2 0
3 3 0
<cfquery name="voteupdate" datasource="msurvey" dbtype="ODBC">
UPDATE totals SET totals.Votes = [Votes]+1
WHERE (totals.ID = #CFvariable#);
Error Diagnostic Information
Error resolving parameter CFVARIABLE
Cold Fusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
1. You have misspelled the parameter name, or
2. You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
The error occurred while evaluating the expression:
The error occurred while processing an element with a general identifier of (#CFvariable#), occupying document position (3:32) to (3:43).