Why do you have Form.requirements in your where clause?  You would be
looping over a LIST of unique IDs and referencing the loop's index in your
where clause.  Change the index name for the loop and reference that in the
where clause then see what happens.

On 10/5/07, erik tom <[EMAIL PROTECTED]> wrote:
>
>
> this code does not work for me. Here is what I did. I copied this function
> function SetFields(lst,lstSave) {
> var t;
> lstSave.value=""
> for (t=0;t<=lst.length-1;t++)
> lstSave.value+=String(lst.options[t].value)+",";
> if (lstSave.value.length>0)
> lstSave.value=lstSave.value.slice(0,-1);
> }
> I added onsubmit="SetFields(document.combo_box.requirements);" to my form
> tag
> I added   <input type="hidden" Name="FieldsSave" id="FieldsSave">
> And also added this
> <cfif isDefined("btnsubmit")>
> <cfparam name="form.FieldsSave" default="">
>                 <cfset Order=0>
> <cfloop list="#Form.FieldsSave#" index="requirements">
> <cfquery name="SetOrder" datasource="HotBanana_Manager">
> UPDATE trnAcademicProgramsAndRequirementsMapping
> SET SortOrder = #Order#
> WHERE reqid = #form.requirements# and degreeid=#form.program#
> </cfquery>
> <cfset Order = Order + 1>
> </cfloop>
> </cfif>
> However I do not get any errors but nothing get updated
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

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

Reply via email to