Glad I could help! :o)

Now... if I could only solve my own problems... ;o)

Chris

Dave Crandell wrote:
Haha!

Nice!

I just did this...and it works great! Thanks Christopher!

                    <cfloop query="qWpLocs">
                        <cfset myLoc=qWpLocs.numLocationID />
<cfoutput><div style="color:blue;">#myLoc#</div></cfoutput> <!--- INSERT WizPlayer Production Content INTO tblProductionContent --->
                        <cfoutput query="qProdContent">
<cfquery name="qInsWPProdContent" datasource="#dbCn#" username="#dbUsr#" password="#dbPw#">
                                INSERT INTO tblProductionContent
                                    (
                                        numProductionID,
                                        numLocationID,
                                        txtBGMusicFile,
                                        intSortOrder,
                                        txtWaveFile,
                                        txtUploadTime,
                                        dtmUpload,
                                        intContentID,
                                        intChange,
                                        intMusicInterval
                                    )
                                VALUES
                                    (
                                        #qProdData.autProductionID#,
                                        #myLoc#,
                                        '#qProdData.txtBGMusicFile#',
                                        #qProdContent.intSortOrder#,
                                        '#qProdContent.txtWaveFile#',
                                        '#qProdData.dtmUploaded#',
                                        '#qProdData.txtUploadTime#',
#qProdContent.autProductionContentID#,
                                        1,
                                        #qProdData.intSeconds#
                                    )
                            </cfquery>
                            <div>#myLoc#</div>
                        </cfoutput>
                    </cfloop>

On 6/26/07, *Christopher Jordan* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Dave,

    I seem to remember there being a problem (read: bug) accessing the
    query values from a nested loop. That is, if you're outer most
    loop is over a query, the inner loops won't have access to the
    query variables. I cannot remember off-hand if this affects only
    <cfoutput> looping or if it also affects <cfloop> looping. What
    you could do *I think* is store the value of qWpLocs.numLocationID
    in a variable in the outside loop, and then access that variable
    in the inner loop.

    Chris

    Dave Crandell wrote:
    Hey guys - this code has been driving me nuts for two days now....

    I've got a query that is supposed to insert data from a few
    different recordsets ... all the data is inserted fine except the
    value #qWpLocs.numLocationID#.

    I print the variable twice for debugging and on the first
    iteration just inside my loop of qWpLocs, it prints correctly.
    However when I try to insert it/print it from inside my
    qProdContent output, it only inserts and prints the value from
    the first iteration...

    below is a sample of my debug output and below that is my code
    ... if y'all can see what I may be doing wrong, that'd rule...

    1834
    1834
    1834

    1812
    1834
    1834

    1820
    1834
    1834

    1824
    1834
    1834

    1826
    1834
    1834

    1850
    1834
    1834

    1866
    1834
    1834

    1874
    1834
    1834
    -------



                        <cfoutput>
                            <!--- INSERT WizPlayer Production Record
    INTO tblProductions --->
                            <cfquery name="qInsWPProd"
    datasource="#dbCn#" username="#dbUsr#" password="#dbPw#">
                                INSERT INTO tblProductions
    (autProductionID, dtmCreated, numCustomerID, intDeleted)
                                VALUES (#qProdData.autProductionID#,
    #Now()#, #qProdData.intCustomerID#, 0)
                            </cfquery>
                        </cfoutput>
                        <!--- LOOP THROUGH WP LOCATIONS--->
                        <cfloop query="qWpLocs">
                            <cfoutput><div
    style="color:blue;">#qWpLocs.numLocationID#</div></cfoutput>
                            <!--- INSERT WizPlayer Production Content
    INTO tblProductionContent --->
                            <cfoutput query="qProdContent">
                                <cfquery name="qInsWPProdContent"
    datasource="#dbCn#" username="#dbUsr#" password="#dbPw#">
                                    INSERT INTO tblProductionContent
                                        (
                                            numProductionID,
                                            numLocationID,
                                            txtBGMusicFile,
                                            intSortOrder,
                                            txtWaveFile,
                                            txtUploadTime,
                                            dtmUpload,
                                            intContentID,
                                            intChange,
                                            intMusicInterval
                                        )
                                    VALUES
                                        (
                                            #qProdData.autProductionID#,
                                            #qWpLocs.numLocationID#,
                                            '#qProdData.txtBGMusicFile#',
                                            #qProdContent.intSortOrder#,
'#qProdContent.txtWaveFile#',
                                            '#qProdData.dtmUploaded#',
                                            '#qProdData.txtUploadTime#',
#qProdContent.autProductionContentID#,
                                            1,
                                            #qProdData.intSeconds#
                                        )
                                </cfquery>
                                <div>#qWpLocs.numLocationID#</div>
                            </cfoutput>
                        </cfloop>

-- Dave C
    www.davesbizarre.com <http://www.davesbizarre.com>
    ------------------------------------------------------------------------

    _______________________________________________
Reply to DFWCFUG: [email protected] <mailto:[email protected]> Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/ <http://www.instantspot.com/>
      www.teksystems.com/ <http://www.teksystems.com/>

-- http://www.cjordan.us


    _______________________________________________
    Reply to DFWCFUG:
     [email protected] <mailto:[email protected]>
    Subscribe/Unsubscribe:
     http://lists1.safesecureweb.com/mailman/listinfo/list
    List Archives:
        http://www.mail-archive.com/list%40list.dfwcfug.org/
      http://www.mail-archive.com/list%40dfwcfug.org/
    DFWCFUG Sponsors:
     www.instantspot.com/ <http://www.instantspot.com/>
      www.teksystems.com/ <http://www.teksystems.com/>




--
Dave C
www.davesbizarre.com <http://www.davesbizarre.com>
------------------------------------------------------------------------

_______________________________________________
Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/
  www.teksystems.com/

--
http://www.cjordan.us

_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.instantspot.com/
  www.teksystems.com/

Reply via email to