> The first time an update occurs, there could be 3 arguments 
> (let's say A133,
> A150, A120).
> 
> The second time an update occurs, there could be 8 arguments 
> (A133, A121,
> A123, A145, and so on).
> 
> The ARGUMENTS value that is passed contains a permissionsID, 
> which will
> always be 1 through 5.  The var name of A133 is actually a 
> reference to the
> actual module ID number contained in the db.  So, yes, I am 
> trying to figure
> out how to have a dynamic var name instead of the fixed 
> ARGUMENTs.A155 using
> a loop.

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:235535
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to