This pseudo-code should do the trick:

Arr1 = ListToArray(Form.Imp1)
Arr2 = ListToArray(Form.Imp2)
Arr3 = ListToArray(Form.Imp3)

<CFLOOP INDEX="thisimportance" FROM="1" TO="#ArrayLen(Arr1)#>
        <cfquery datasource = "whatever">
         INSERT into testing (Importance,Place,Comments)
          VALUES
('#Arr1[thisimportance]#',#Arr2[thisimportance]#',#Arr3[thisimportance]#')
        </cfquery>
</CFLOOP>

HTH,

Kevin

Kevin Miller
IT Systems Resource Manager
Medtronic Vascular
[EMAIL PROTECTED]
(707) 566-1200

>>> [EMAIL PROTECTED] 05/10/00 10:08AM >>>
Is it possible to create multiple lists in a CFLOOP that would allow me
to
insert several lists into a couple of columns?
I know it is possible with one.
ie,
<CFLOOP INDEX="thisimportance",
 LIST="#form.imp1#,#form.imp2#,#form.imp3#>
        <cfquery datasource = "whatever">
  INSERT into testing (Importance)
  VALUES ('#thisimportance#')
  </cfquery>
</CFLOOP>

But how would it work if I wanted to insert the following lists into
the
corresponding fields?
ie,
list- "#form.imp1#,#form.imp2#,#form.imp3#  into column (Importance)
list- "#form.place1#,#form.place2#,#form.place3# into column (Place)
list- "#form.comments1#,#form.comments2#,#form.comments3# into column
(Comments)

The reason I ask if it's possible to do all this with one INSERT
command is
that I need #form.imp1#, #form.place1#,and #form.comments1# to enter as
a
single  record in the DB so that the output would look like;
(importance)1---- (place)Ontario, (comments)Is nice
 etc.

Am I approaching this in the right way? Can anyone suggest a way to do
this?

TIA
spence

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to