http://www.amazon.com/exec/obidos/tg/detail/-/032151548X

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-----Original Message-----
From: erik tom [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 01, 2008 10:43 AM
To: CF-Talk
Subject: multiple insert in coldfsuion

i am looping through theform and collecting survey answers, if i select
multiple answers they get inserted on one line how can i insert the value
individulay? How can i modify the code so i can make the code work the way i
need 

<cfif isDefined("btnSubmitSurvey")>
<cfoutput>
<cfif isDefined("form.fieldnames")>
<CFLOOP LIST="#form.fieldnames#" Index="field">
<cfif #field# neq "btnSubmitSurvey">
<cfquery name="qryInsert" datasource="cfelsunrise" dbtype="odbc">
                insert into answers (questionidfk,answer,empID,surveyID)
values
(#ListLast(Evaluate("Form.#field#"),"_")#,'#Evaluate(field)#',#session.empID
#,#url.survey#)
        
        
        </cfquery> 
  <cfelse>
 </cfif>
</CFLOOP>

</cfif>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304584
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to