You can forego the loop alltogether.  Refer to the query column as an array.

<cfif listFind('the category',arrayToList(myQuery.category)) neq 0>
        TITLE!
</cfif>


Eric

-----Original Message-----
From: Smith, Daron [PA] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 2:48 PM
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/[email protected]/
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to