Daniel
Daniel

Reputation: 35674

cfoutput grouped query - seeing the result

I'd like to have a look at the query that would be inside this:

<cfoutput query="myQuery" group="ID">
   <cfdump var="#theResultingRows#" />
</cfoutput>

Is there a way of getting the internal query results other than running a QoQ with matching id?

Upvotes: 1

Views: 118

Answers (1)

Dan Bracuk
Dan Bracuk

Reputation: 20794

Yes, you can use nested cfoutput tags as described in the documentation. You can also use a loop and array notation to save typing.

<cfoutput query="x" group="id">
 id is #id#<hr>
 <cfoutput>
    <cfloop list="#x.columnlist#" index="field">
      #field# is #x[field][currentrow]#
    </cfloop>
    <br>
  </cfoutput>
</cfoutput>

Upvotes: 2

Related Questions