Sorry I did not understand your post. I guess your table for phonenumbers is
kind of like so.

phonenumbers

id pk int autonumber
custid fk_customer int

<cfquery datasource="yourDsn" name="yourQueryName">
insert into phonenumber
(custid,phone1,phone2,phone3,phone4,phone5,phone6,phone7,phone8,phone9,phone
10)
values
(#custid#,'#phone1#','#phone2#','#phone3#','#phone4#','#phone5#','#phone6#',
'#phone7#','#phone8#','#phone9#','#phone10#')
</cfquery>

Doug

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 6:06 PM
Subject: How do you insert 10 form fields into one database field?


> Whats the best way to insert 10 form fields into one field in the server
> database via CFHTTP.
>
> Is it better to:
>
> 1. Do 10 separate insert statements or
>
> 2. Use just CFINSERT and let it occur autmatically or
>
> 3. Use a loop statement.
>
> Field name on form is "phonenumber", there are 10 different ones, i.e.
>
> phonenumber1
> phonenumber2
> phonenumber3, etc, etc
>
> And all need to post into the field 'phonenumber' in the database as
> separate records (unique rows/records). Am also inserting with each number
> the custid so it a join can occur to the main customer table.
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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