>Try this:
>
> <cfif get_A.recordcount>
> <cfoutput query="get_A">
> <cfset variables["p_answer" & get_A.currentRow] = p_answer>
> </cfoutput>
> </cfif>
>
>Also, you could copy things into an array, it'd probably be a slightly
>better practice:
>
> <cfset p_answer = arrayNew(1) />
> <cfif get_A.recordcount>
> <cfset p_answer = listToArray(valueList(get_a.p_answer)) />
> </cfif>
>
>-Joe
>
>
>
>----- Original Message -----
>From: Daniel Kessler <[EMAIL PROTECTED]>
>Date: Thu, 16 Sep 2004 09:49:08 -0400
>Subject: evaluating variables
>To: CF-Talk <[EMAIL PROTECTED]>
>
>I am trying to build variables for query output. I am receiving the
> error, "cannot assign a variable to a function". I am trying to make
> p_answer1, p_answer2, p_answer3, for as many answers as I have. How
> might I restructure this code to accomplish it.
>
> <cfif get_A.recordcount NEQ 0>
> <cfoutput query="get_A">
> <cfset evaluate("p_answer#get_A.currentRow#") = p_answer>
> </cfoutput>
> </cfif>
>
> thanks.
>
> --
> Daniel Kessler
>
> Department of Public and Community Health
> University of Maryland
> Suite 2387 Valley Drive
> College Park, MD 20742-2611
> 301-405-2545 Phone
> www.phi.umd.edu________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

