Fantastic! Thanks, Raymond and Todd (and anyone else who answers!)
Matthieu -----Original Message----- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 1:45 PM To: CF-Talk Subject: RE: looping through query columns, not rows Yes, every query object has a .columnList property. So, queryname.columnList is a list of columns for the query. You can loop over it using bracket notation: col #col# is #queryname[col][rownum]# -Raymond Camden, ColdFusion Jedi Master for Hire > -----Original Message----- > From: Cornillon, Matthieu [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 13, 2002 1:40 PM > To: CF-Talk > Subject: looping through query columns, not rows > > > Hi, everyone. Is there a way to loop through the columns--and not the > rows--of a query? Let's say I have a query: > > <cfquery name="GetData" dsn="mydsn"> > SELECT * > FROM USERS > </cfquery> > > ..and I am too lazy to type out all of the many columns to > output them to a > page. Can I loop through the columns, first to display the > column names and > second to display the values within those columns? > > Basically, I want to loop through the query as I would loop > through the Form > structure, for example, to output all current form variable values. > ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com 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

