Question
Nested CFOUTPUT group processing...
Hi,
I have been using the group attribute of CFOUTPUT for some time now, it's really really helped a lot!
However, I am now in a situation where two separate queries (each of which needs it's own grouping) need to be nested. But, this doesn't seem to be possible because CF throws an error about the query "driving" the process.
See the example code below...
<cfoutput query="foo" group="a">
#foo.a#
<cfoutput query="foo" group="b">
#foo.b#
</cfoutput>
</cfoutput>
This works great, BUT, if I do the following it will fail.
<cfoutput query="foo" group="a">
#foo.a#
<cfoutput query="foo" group="b">
#foo.b#
<cfoutput query="bar" group="c">
#bar.c#
</cfoutput>
</cfoutput>
</cfoutput>
However, for many reasons I NEED to have nested grouping like this and I can't see another way around it. While it is perfectly fine to have queries looped within other queries (usually with CFLOOP) CFLOOP does not support the GROUP attribute like CFOUTPUT does.
If anyone can help I'd really appreciate it. I'm not sure how to get around this issue at all.
Thanks,
Mikey.
I have been using the group attribute of CFOUTPUT for some time now, it's really really helped a lot!
However, I am now in a situation where two separate queries (each of which needs it's own grouping) need to be nested. But, this doesn't seem to be possible because CF throws an error about the query "driving" the process.
See the example code below...
<cfoutput query="foo" group="a">
#foo.a#
<cfoutput query="foo" group="b">
#foo.b#
</cfoutput>
</cfoutput>
This works great, BUT, if I do the following it will fail.
<cfoutput query="foo" group="a">
#foo.a#
<cfoutput query="foo" group="b">
#foo.b#
<cfoutput query="bar" group="c">
#bar.c#
</cfoutput>
</cfoutput>
</cfoutput>
However, for many reasons I NEED to have nested grouping like this and I can't see another way around it. While it is perfectly fine to have queries looped within other queries (usually with CFLOOP) CFLOOP does not support the GROUP attribute like CFOUTPUT does.
If anyone can help I'd really appreciate it. I'm not sure how to get around this issue at all.
Thanks,
Mikey.
