or evaluate("myquery.columnName") works too.
Pat
On 5/22/06, Mark Mandel <[EMAIL PROTECTED]> wrote:
Hey all,
This seems like a stupid question, but I can't seem to figure it
If I have a query, called 'myQuery' I can do:
(1)
<cfloop query="myQuery">
myQuery.column
</loop>
and it will output fine.
I can do:
(2)
<cfset column = "myColumn"/>
<cfloop query="myQuery">
myQuery[column][myQuery.currentRow]
</loop>
and it will output fine
But if I do:
(3)
<cfset column = "myColumn"/>
<cfloop query="myQuery">
myQuery[column]
</loop>
I get the error:
Complex object types cannot be converted to simple values.
Is option (2) the only way to handle dynamic column names?
I had thought option 3 would work.. but it doesn't seem to...
Help?
Mark
--
E: [EMAIL PROTECTED]
W: www.compoundtheory.com
ICQ: 3094740
- [cfaussie] Re: How do myQuery["columnName"] ? Patrick Branley
- [cfaussie] Re: How do myQuery["columnName"]... Barry Beattie
- [cfaussie] Re: How do myQuery["columnName&qu... Blair McKenzie
- [cfaussie] Re: How do myQuery["columnNam... Mark Mandel
- [cfaussie] Re: How do myQuery["columnName&qu... Patrick Branley
- [cfaussie] Re: How do myQuery["columnNam... Mark Mandel
- [cfaussie] encoding and word docs Mark Ireland
- [cfaussie] Re: encoding and word doc... Blair McKenzie
- [cfaussie] Re: encoding and word... Mark Ireland
- [cfaussie] Re: How do myQuery["columnName"]... Barry Beattie
- [cfaussie] Re: How do myQuery["columnName"]... Steve Onnis
