arrayToList won't work on a query column.  It's true query columns are
arrays, but they are very special arrays and can ONLY be treated as arrays
in order to access certain records (myQuery.columnName[i])

to make a list use valueList("myQuery.columnName"), but I wouldn't recommend
it to solve this particular problem

+-----------------------------------------------+
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: Carlisle, Eric [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 12:00 PM
To: CF-Talk
Subject: RE: Conditional Query loop


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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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