Here's the challenge: I am creating an application that takes an input from a form, and based on the value the user selected, that determines which table to query against. How do I get the results of the query out?
This is my query:
AdrTable is set based on user input. As you can see, AdrID and AdrAddress are columns in the table. I am trying to output the results of the query as follows:
It displays the column names for each element in the table. On one level, I understand that, because they are variables I set earlier, and it is displaying the variable value. But, how do I get it to give me the query results? Or, if there's a better way, I'm open to suggestion. Thanks, everyone! Calista :-X
Jedi Knight,
Champion of the Force
This is my query:
Code:
<CFQUERY NAME="GetAddress"
DATASOURCE="#Application.Datasource#"
DBTYPE="ODBC">
SELECT #AdrID#,#AdrAddress#
FROM #AdrTable#
</CFQUERY>
Code:
<CFOUTPUT QUERY="GetAddress">
<TABLE ALIGN="center" BORDER="1">
<TR>
<TD WIDTH="25">#AdrID#</TD>
<TD WIDTH="100">#AdrAddress#</TD>
</TR>
</TABLE>
</CFOUTPUT>
Jedi Knight,
Champion of the Force