Hi,

I am trying to group some output from a query and I can only seem to some of it to group properly

I have the following output:

<cfoutput query="journoDetails" group="journoid">
<cfif journoDetails.region IS NOT "">
<td class="normal" valign="top"><cfoutput group="regionid">#journoDetails.region#<br></cfoutput></td>
</cfif>
<cfif journoDetails.town IS NOT "">
<td class="normal" valign="top"><cfoutput group="townid">#journoDetails.town#<br></cfoutput></td>
</cfif>
<cfif journoDetails.isNational EQ 1>
<td class="normal" valign="top">
National (Options: <cfif journoDetails.natOpt IS NOT "">(<cfoutput group="natOptid"> #journoDetails.natOpt#</cfoutput>)<cfelse>None specified.</cfif>)
</td>
</cfif>
</cfoutput>

With my test query I get 4 results for a particular journoid and this above code gives something like:

Region: Buckinghamshire<br>Oxfordshire
Town: Chipping Norton<br>Oxford<br>Chipping Norton<br>Oxford

What I want of course is for only the two regions and two towns to be listed. I have tried ordering the query and this causes region to be duplicated.

Any help or ideas of a workaround?

Thanks

Dave


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to