<cfoutput>
<cfform name="input" ENCTYPE="multipart/form-data">
Data Source:
<cfif isDefined("database")>
<cfinput type="text" name="database" size="25" value="#database#"><br>
<cfelse>
<cfinput type="text" name="database" size="25" value=""><br>
</cfif>
Query: <cfinput type="text" query="SQL" name="query" size="130" value=""><br>
Output: <cfinput type="text" name="output" size="100" value=""><br>
<input type="submit" value="Submit" />
</cfform>
</cfoutput>
<cfif isDefined("database")>
<cfquery name="SQL" DataSource="#database#">
#query#
</cfquery>
<cfoutput>#query#</cfoutput>
<cfoutput query="SQL">
<div>#output#<div>
</cfoutput>
</cfif>
Hello, I have some question for coldfusion.
I want create a page ( for administrator ) can query SQL by tag <cfinput>
Example:
database: testdatasource
query: select * from table_name
output: column_name
We will have query: select * from table_name, and show column_name in this table.
But i have problem, i input output it column_name ( not #column_name#), the tag <cfoutput> will give to me string "column_name", not is query result.
Please help me how to input column_name and this will get column_name of this query, not is string.