Thanks for all who helped me. I added a <cfoutput query> to the list
loop below and everything worked perfectly.
<SELECT NAME="Foo">
<CFOUTPUT QUERY="getcommonnames">
<CFLOOP LIST="#common_names#" INDEX="Item">
<OPTION>#Item#</OPTION>
</CFLOOP>
</CFOUTPUT>
</SELECT>
Chris Lofback wrote:
>How about a list loop like this:
>
><SELECT NAME="Foo">
><CFLOOP LIST="#MyQuery.ListField#" INDEX="Item">
> <OPTION>#Item#</OPTION>
></CFLOOP>
></SELECT>
>
>Or if you just want the items without the select, like this:
>
><CFLOOP LIST="#MyQuery.ListField#" INDEX="Item">
> <BR>#Item#
></CFLOOP>
>
>Chris Lofback
>Sr. Web Developer
>
>TRX Integration
>28051 US 19 N., Ste. C
>Clearwater, FL 33761
>www.trxi.com
>
>
>>-----Original Message-----
>>From: Shirley [mailto:[EMAIL PROTECTED]]
>>Sent: Friday, September 20, 2002 8:20 AM
>>To: CF-Talk
>>Subject: Re: Looping
>>
>>
>>Part of my problem is database design, where CSV lists are
>>allowed in a
>>field name. I know I have to correct this and create a
>>separate table.
>>
>>However, for now, some of the records are quite long. For
>>example here's
>>the unabridged record that I alluded to in my previous message: Tall
>>Whitetop, Tall Pepperweed, Perennial Pepperweed, Giant Whiteweed,
>>Perennial Peppergrass, Slender Perennial Peppergras, Broadleaf,
>>Broad-leaved Pepperweed, Ironweed). So, you can imagine this
>>list would
>>stretch across the screen. So, that's why I need to break
>>apart the list.
>>
>>If the entires were shorter, I would use the simple method
>>you pointed
>>out. Any other suggestions? Thanks.
>>
>>Thomas Chiverton wrote:
>>
>>>>After querying the database, I want to loop over these records and
>>>>output them in the following format, so that I can use them
>>>>
>>in a Select
>>
>>>>List:
>>>>
>>>Any reason not to just do something like this, or use <cfselect> :
>>>
>>><select>
>>><CFOUTPUT QUERY="getcommonnames">
>>> <option>#Common_Names#</option>
>>></CFOUTPUT>
>>></select>
>>>
>>>?
>>>
>>>Tom Chiverton
>>>You don't have to be a mad scientist to believe in ColdFusion
>>>
>>>
>>>
>>>
>>>
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
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