what's the query?

Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


                                                                                       
                            
                    Dave Phipps                                                        
                            
                    <dave@phipps-        To:     ColdFusion User group 
<[EMAIL PROTECTED]>               
                    cf.co.uk>            cc:                                           
                            
                                         Subject:     [ cf-dev ] grouping output 
problem                           
                    01/23/03                                                           
                            
                    03:27 PM                                                           
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    dev                                                                
                            
                                                                                       
                            
                                                                                       
                            





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]






-- 
** 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