simple lesson in query grouping... When you specify a group attribute like so... <cfoutput query="myQuery" group="firstName"> do whatever <cfoutput> do inner stuff </cfoutput> </cfoutput>
it will loop over the results and will "do whatever" every time it finds a "firstName" that is different than the previous result. "do inner stuff" will process all the rows that have the same "firstName" as the previous row. Example: row firstName lastName ------------------------ 1. Adam Ant 2. Adam Apple 3. Anna Conda for the code above, "do whatever" will happen for rows 1 and 3. "do inner stuff" will happen for row 2. It is crucial that you ORDER BY whatever column you want to group by in your SELECT query. +-----------------------------------------------+ 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: Paul Ihrig [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 3:18 PM To: CF-Talk Subject: RE: output cf to html thanks guys... i will try it a few differnt way that you suggested. Now if i could only learn how to loop over my quries with a group with QaQ?? then i think i wouldnt even need to do this right now i have like 20 incldes a hiting the same data source many, many times just to get the output i want very convoluted & amature... i know.. wish i knew more. ______________________________________________________________________ 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