Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outputing results of dynamic query

Status
Not open for further replies.

BettyGay

Programmer
Feb 23, 2005
12
US
I have a query that looks something like this:

<cfquery name="AFX" datasource="xxx">
Select #form.selectA#, #form.select1#, #form.select2#
from TblUniforms
Where (#form.selectA# like '%#form.text#%')
</cfquery>
The form variables come from the previous page and are submitted by the user. The query works when I dump it but how do I output it for the user? I normally create a table and loop through the row but I don't know what will be in the row.
 
Assuming that the form fields are always the same

<cfoutput query="AFX">
#evaluate(form.selectA)#, #evaluate(form.select1)#, #evaluate(form.select2)#<br>
</cfoutput>

You could of course format it with a table or another methods you might choose.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top