I have a loop that queries a SP and returns results in a query, I want to combine that query (however many times the loop runs) into one final query so I can output in my jgrid table. Here is the code:
<cfloop query="query1">
<cfstoredproc procedure="[Columns]" datasource="#CompanyDB#">
<cfprocresult name="queryResults">
<cfprocparam cfsqltype="cf_sql_varchar" value="#query1.ID#">
<cfprocparam cfsqltype="cf_sql_varchar" value="#query1.Role#">
</cfstoredproc>
</cfloop>
So, here it loops 2 times hence I get 2 queryResults. I want to combine the results into 1 big query so I can then output in jGrid query.
Copyright Notice:Content Author:「user2675939」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40033875/combine-loop-query-results-into-1