I would say INSERT if you are 100% certain that all field names match up.  However, if you want a manual way of doing it, here's a quick hack of a suggestion.  

<cfset columnList = "">
<cfset valueList = "">
<cfloop index="formField" list="#form.fieldnames#" delimiters=",">
<cfset columnList = ListAppend(columnList, formField, ",")>
<cfset valueList = ListAppend(valueList, form[formField], ",")>
</cfloop>

<cfquery name="q_insert_form_fields">
INSERT INTO MyTable ( #columnList# ) VALUES ( #valueList# )
</cfquery>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to