Dynamic Query Output
Hey everybody, have a quick question. I just started using ColdFusion last week for my current job and I'm doing some database work. One of the scripts I'm working on is to dynamically allow a user to enter in information for a data source, their username, password, a database, and then a Query-By-Example-esc operation on that database. One issue I'm running into though is displaying this data. So, let's say that I get input from a simple HTML form and it's being passed in under the name "Column_1". So, when I go to access it for my SQL statement, I would be using:
#Form.Column_1#
My problem comes to when I am printing this data out. I'm using the following code normally:
<cfoutput query="GetResults">
#username#
</cfoutput>
Where #username# is the column I was searching for. How would I be able to dynamically have it output whatever would be entered as the column name in Column_1? So something like:
<cfoutput query="GetResults">
# #Form.Column_1# #
</cfoutput>
Thanks!
