> <cfloop list="#form.Accomidations#" index="x">
> <cfquery datasource="blah" name="insertAccomidation">
> insert into tblAccomidations (personKey,
> accomitationId) values(pid,x)
> </cfquery>
> </cfloop>
Not forgetting to put #'s around your variables;
insert into tblAccomidations (personKey, accomitationId)
values(#pid#,#x#)
Otherwise your SQL will break immediately
Also, if you're using a database engine that allows TSQL, then put the
loop inside the CFQUERY and put a ; at the end of each INSERT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at
http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4