Hello,

I have an issue that I am hoping you all can help me with.

I have a loop, in which I need to call a coldfusion query that is dynamic.

I then need to call another query, based on the first query and output the 
results dynamically. I am stuck on this.

Here is my loop and queries:

<cfloop index="i" from="1" to="#courseCount.recordCount#">
        <cfstoredproc procedure="XXXXXX" datasource="#request.dsn#" 
returncode="yes">
          <cfprocparam 
             
                cfsqltype="CF_SQL_INTEGER" 
                variable="userID"
                value="#session.userID#">

          <cfprocparam 
                cfsqltype="CF_SQL_INTEGER" 
                variable="course"
                value="#i#">
                
          <cfprocresult name="course#i#">
        </cfstoredproc>





<cfstoredproc procedure="XXXXXX" datasource="#request.dsn#" returncode="yes">
    <cfprocparam 
        cfsqltype="CF_SQL_INTEGER" 
        variable="userID"
        value="#session.userID#">
    <cfprocparam 
        cfsqltype="CF_SQL_INTEGER" 
        variable="courseID"
        value="#i#">
    <cfprocparam type="In" 
        cfsqltype="CF_SQL_DATE" 
        variable="fromDate"
        value="#getCourse#i#.CREDITDESIGNATIONFROM#">
    <cfprocparam type="In" 
        cfsqltype="CF_SQL_DATE" 
        variable="toDate"
        value="#getCourse#i#.CREDITDESIGNATIONTO#">
    <cfprocresult name="course#i#Apply#ceuPref.strCme#">
  </cfstoredproc>
</cfloop>

My issue is adding the i variable in the 2nd query dynamically.

How do I so this?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358344
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to