Well we're warm:

The qPermissionsCount has the moduleID's, in this case 133, 141, 151.
The permissionID should be numeric from 1-5 for each ARGUMENT that is passed
in, which would be A133, A141, A151.  So, thisID needs to refer to each
ARGUMENTS.A(x) in turn. 

<cfloop index="i" from="1" to="#qPermissionCount.recordcount#">
<cfset thisId = "A#i#">
<cfquery name="updOBJ2" datasource="#REQUEST.dsnSQL#"
username="#REQUEST.dsnUID#" password="#REQUEST.dsnPWD#">
  UPDATE
#SESSION.companyInfo.companyTablePrefix#_Users_List_UserModulesPermissions 
  SET permissionID = <cfqueryparam cfsqltype="cf_sql_integer"
value="#thisId#">  
  WHERE userID = <cfqueryparam cfsqltype="cf_sql_char"
value="#ARGUMENTS.userID#"> 
    AND moduleID = <cfqueryparam cfsqltype="cf_sql_integer"
value="#qPermissionCount.moduleID#">
</cfquery>      
</cfloop> 

Thanks,
Mark

-----Original Message-----
From: Munson, Jacob [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 16, 2006 10:28 AM
To: CF-Talk
Subject: RE: Dynamic Form Selects and Posting Troubles

Here's something that works in my environment:
<cfloop index="i" from="1" to="3">
        <cfset thisId = "A#i#">
        <cfquery name="PayPeriods" datasource="Budgets">
                select id 
                from payrollfactors 
                where id = <cfqueryparam cfsqltype="cf_sql_integer"
value="#thisId#">
        </cfquery>
</cfloop>

I believe you could also just put the "A#i#" into your value of the
cfqueryparam (instead of cfsetting it separately).  Of course, you'll have
to change this to use the value from your DB instead of the index counter in
my example.  Your loop will be a loop over the items in your first query.


----------------


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law.  If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format.  Thank you.   A2





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235537
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to