do you want 'i' to represent a row in your query (your query
returns N
rows of column answer), or does your query return only 1 row
with N
columns answer1, answer2, ..., answerN?
if the former, correct array notation in that case is:
votecheck['answer']
if the latter, your query must be returning more than 1 row
and that's
why the array notation does not work - you need to specify a
query row.
this may work in this case:
<cfoutput query="votecheck">
<cfloop index="i" from="1"
to="#application.dbquestions#">
<cfif votecheck["answer" & i][currentrow] EQ 1>
<cfset voteranswer = votecheck["answer" &
i][currentrow]>
</cfif>
</cfloop>
</cfoutput>
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/