My goal is to just output the column data specified in the "fieldList".
Getting the following error:
Complex object types cannot be converted to simple values. The expression has requested a variable or an intermediate expression result as a simple value, however, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values. The most likely cause of the error is that you are trying to use a complex value as a simple one. For example, you might be trying to use a query variable in a cfif tag. The error occurred on line 20.
When trying to do the following:
<cfquery datasource="retailers" name="myQuery">
Select * FROM retailer
WHERE retailer_id = '#url.id#'
</cfquery>
<cfset fieldList = "company,phone,phone_secondary,fax,email,website">
<cfloop list="#fieldList#" index="i">
#myQuery[i]#
</cfloop>
Shouldn't this work without giving me an error? I feel like I'm just overlooking something simple I just can't find the answer anywhere.