I have a query that is built dynamically from the user input determining what fields should be completed.first it determines that questions that should have been completed by the user:
It then creates a string list of the questions:
All fine so far and everything works.
What I now want to do it output that query to the page or to a file but cannot figure out how to do it without specifying each col header (depending on the user this is between 25 & 70 so has to e dynamic).
Any help much appreciated.
Code:
<CFQUERY datasource="DeskScripts" name="ShowQuestions">
SELECT Questions.*
FROM Questions
WHERE Questions.UserrType = #User#
</CFQUERY>
Code:
<CFOUTPUT query="ShowQuestions">
<CFSET jmQuery = jmQuery & "Scripts.#Reference#,">
</CFOUTPUT>
and then queries the results:
Code:
<CFQUERY datasource="DeskScripts" name="SACDetails">
SELECT Scripts.SAC, #jmQuery# DeskBase.Treatment
FROM Scripts INNER JOIN DeskBase ON Scripts.SAC = DeskBase.SAC
WHERE DeskBase.Treatment = '#jmTreatment# Touch'
</CFQUERY>
What I now want to do it output that query to the page or to a file but cannot figure out how to do it without specifying each col header (depending on the user this is between 25 & 70 so has to e dynamic).
Any help much appreciated.