Forum Moderators: phranque
<cfset total_records=test.recordcount>
<cfquery name="Data" datasource="Survey">
SELECT * FROM "DATA"
</cfquery>
<cfset Comments=arraynew(1) />
<cfloop query="Data">
<cfset Comments[CurrentRow]=(#url.RecordID#)>
</cfloop>
When I use a <cfoutput> to view the array, I lines of whatever the url.RecordID variable is set to as opposed to the data from the column to which it refers.
If anyone has any ideas as to how to approach this problem, please let me know.
This is just a plain old vanilla assignment statement.
It's the same as
<cfset Comments[CurrentRow] = url.RecordID>
Try
<cfset Comments[CurrentRow] = evaluate("#url.RecordID#")>
Evaluate takes a list of string arguments
evaluate(string1, string2, string3[,...]), evaluates
them, and returns the value of the last string.
Hope this helps.
-DD