Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Yavka #1
Dynamic variable names??? Please Help!
So I'm making this application for accessing research data - lots of different
data tables, each with it's own data columns.
I have made the interface where the user can pick which data columns to
download. This produces a list of table columns to be fetched by the database -
I pass this on to the SQL query, and get back the result. But how do I output
that, without hard-coding the names of the data columns?
<cfoutput query="qData">
#qData.col1#,#qData.col2#,#qData.col3#
</cfoutput>
The above would be fine, but I don't know which of the many columns have been
selected - they are stored in the list variable, and also in qData.ColumnList,
but I can't figure out how to use the list contents to tell cfoutput what to
output. Is there a way to make it output all the columns in a query, withouit
specifying their names?
Thanks,
y
Yavka Guest
-
Javascript variable names in strings
This should be easy, but i can't find any info on how to do it! It's easy to put the contents of a variable into a string but how does one place... -
Assign Array with Dynamic Variable Names
I have an 2 dimensional array that I want to assign to an 1 dimensional array with a dynamic Variable Name. I can set the newarray function, but I... -
possible to read flashvars if variable names are not known?
When passing arguments from the embedding HTML page to the Flash movie you can use flashvars e.g. <embed flashvars="arg1=1&arg2=2" ...> and then... -
variable movie names
your all superstars! a pair of square brackets are what were required- the top answer worked first time, so thanks guys for all your help. morgn. -
Dynamic Variable Names
I have a shopping cart page that allows a user to type in a new quantity and press a button. The quantities entered are in form text boxes with... -
mxstu #2
Re: Dynamic variable names??? Please Help!
<cfoutput query="qData">
<cfloop list="#qData.columnList#" index="col">
#qData[col][currentRow]#
</cfloop><br>
</cfoutput>
mxstu Guest
-
Yavka #3
Re: Dynamic variable names??? Please Help!
Yes, this works. Thanks a bunch!
I see now how it works - it's so simple, I would have never thought of it! I
wish they had stuff like this clearly explained in the documentation. Or could
you recommend a good book?
:-) :-) :-)
Yavka Guest
-
mxstu #4
Re: Dynamic variable names??? Please Help!
Yes, it would be nice but I guess it is hard to document *every* usage of every available feature! I'm not that up on the recent books but you might want to search the forums for recommendations.
mxstu Guest



Reply With Quote

