if the query results are ordered by category then just:

<cfoutput query="myQuery" group="category">
#category#<br>
<cfoutput>
        loop through all sub-records here
</cfoutput>
</cfoutput>

+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
        - Thomas Paine, The American Crisis



-----Original Message-----
From: Smith, Daron [PA] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 11:48 AM
To: CF-Talk
Subject: Conditional Query loop


Is it possible to loop over a query until a condition is met?  Specifically,
I am returning search results, if a certain category exists i want to
display a title, if no records for that category exist I do not want to
display the title.  However I only want to display the title one time if the
records exist.  Looping over the query will display the title the number of
times that the condition exists in the recordset, but a conditional query
doesn't appear to allow a query to loop over.

Thanks for any help,

Daron J. Smith
Web Developer
PSEA

[EMAIL PROTECTED]
717-255-7141 
1-800-944-PSEA (7732) x 7141
Please note new email address (old one with 'mail' will soon expire)

 
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to