inserting into multiple tables using cfloop index
Please help ASAP. I AM TRYING TO FIGURE OUT HOW TO INSERT DATA INTO MULTIPLE TABLES OF AN ORACLE DB USING CFLOOP INDEX.
I have the following code provided to me by another developer.
<cfloop index="thefield" list="#form.fieldnames#">
<cfset fields="#thefield# = #evaluate(thefield)#">
<cfoutput>#fields#</cfoutput><br>
</cfloop>
This outputs the following:
RESULTS_ARRAY0=CORE DATA
RESULTS_ARRAY1=STATUS
RESULTS_ARRAY2=LOCATION
RESULTS_ARRAY3=RAW SCORE
RESULTS_ARRAY4=MAX SCORE
RESULTS_ARRAY5=MIN SCORE
RESULTS_ARRAY6=TIME
<---i need to insert this data into 1 table--->
RESULTS_ARRAY7=FAILED (status - array1 value)
RESULTS_ARRAY8=31 (location - array2 value)
RESULTS_ARRAY9=60 (raw score - array3 value)
RESULTS_ARRAY10=170 (max score - array4 value)
RESULTS_ARRAY11=0 (min score - array5 value)
RESULTS_ARRAY12=00:02:32 (time - array6 value)
RESULTS_ARRAY13=INTERACTION DATA
RESULTS_ARRAY14=DATE
RESULTS_ARRAY15=TIME
RESULTS_ARRAY16=INTERACTION ID
RESULTS_ARRAY17=OBJECTIVE ID
RESULTS_ARRAY18=INTERACTION TYPE
RESULTS_ARRAY19=CORRECT RESPONSE
RESULTS_ARRAY20=STUDENT RESPONSE
RESULTS_ARRAY21=RESULT
RESULTS_ARRAY22=WEIGHT
RESULTS_ARRAY23=LATENCY
<----i need to insert this data into another table --------------------------->
<----this set of data repeats 16 times with different values---->
RESULTS_ARRAY24=06/15/2010 (date - array14 value)
RESULTS_ARRAY25=10:53:14 (time - array15 value)
RESULTS_ARRAY26=INTERACTION 1240217 (interaction id - array16 value)
RESULTS_ARRAY27=QUIZ10030 (objective id - array 17 value)
RESULTS_ARRAY28=SEQUENCING (interaction type - array18 value)
RESULTS_ARRAY29=PRE-NEGOTIATION, PROCESS, CONSIDERATION, IMPLEMENTATION (correct response - array19 value)
RESULTS_ARRAY30=IMPLEMENTATION, PROCESS, PRE-NEGOTIATION, CONSIDERATION (student response - array20 value
RESULTS_ARRAY31=WRONG (result - array21 value)
RESULTS_ARRAY32=10 (weight - array22 value)
RESULTS_ARRAY33=00:00:03 (latency - array23 value)
<----starts next set of results---------------------------------------------->
RESULTS_ARRAY34=06/15/2010
RESULTS_ARRAY35=10:53:19
RESULTS_ARRAY36=INTERACTION 1240217
RESULTS_ARRAY37=QUIZ10030
RESULTS_ARRAY38=TRUE-FALSE
RESULTS_ARRAY39=TRUE
RESULTS_ARRAY40=TRUE
RESULTS_ARRAY41=CORRECT
RESULTS_ARRAY42=10
RESULTS_ARRAY43=00:00:02
<----next set will start here.....etc----->
RESULTS_ARRAY44=....
UNTIL
RESULTS_ARRAY183=....
ANY SUGGESTIONS WILL BE GREATLY APPRECIATED!
