The following code will loop through all of the form fields and set a
variable to a comma delimited list of the titles. You can then use the
variable for your insert.
<CFSET lcSongList = "">
<CFLOOP INDEX="lcFieldName" LIST="#FORM.FieldNames#">
<CFIF LEN(lcSongList) GT 0>
<cfset lcSongList = lcSongList + ",">
</CFIF>
<CFSET lcSongList = lcSongList +
TRIM(EVALUATE("FORM.#lcFieldName#"))>
</CFLOOP>
Hope this helps.
______________________________________________________
Bill Grover
Supervisor MIS Phone: 301.424.3300 x3324
EU Services, Inc. FAX: 301.424.3696
649 North Horners Lane E-Mail: <mailto:[EMAIL PROTECTED]>
Rockville, MD 20850-1299 WWW: <http://www.euservices.com>
______________________________________________________
> -----Original Message-----
> From: Douglas Brown [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 16, 2002 10:12 PM
> To: CF-Talk
> Subject: Looping though form fields for insert
>
>
> I have 14 fields that hold the values of song titles, I need
> to insert
> these into one column on insert. How can I accomplish this? Each song
> title is associated with a album ID
>
>
>
> There are two major products that come out of Berkeley: LSD
> and [Unix]
> BSD. We don't believe this to be a coincidence.
>
>
>
> Doug Brown
>
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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