I don't fully understand what the problem is, but if all you're looking to
do is loop over two queries at the same time, try this:

<cfloop query="query1">

        #query1.column# #query2["column"][query1.CurrentRow]#

</cfloop>

That assumes you have the same number of records in each query.

I'm guessing there's more to it than that though?

Adrian

-----Original Message-----
From: Nick Sweeney [mailto:[EMAIL PROTECTED]
Sent: 21 March 2006 21:57
To: CF-Newbie
Subject: RE: CFLoops


I guess I should simplify that last post  - -

I have two tables Pages and Colors - - I need to output a the two together -
so that I get a different color with each page....  Currently I only get
either all one color - or all one page.

http://cf.bigfatdesigns.com/clients/roto/test.cfm


Here's my faulty code:

<!--- Get The Colors --->
<cfquery name="qryGetMenuBG" datasource="#datasource#" username="#username#"
password="#password#">
SELECT *
FROM MenuBackground
ORDER by MBSort
</cfquery>

<!--- Get The menu --->
<cfquery name="qryGetAllMenu" datasource="#datasource#"
username="#username#" password="#password#">
SELECT Content.PageID, Content.Title, Content.AssocID, Content.Sort
FROM Content
WHERE Content.AssocID = '0'
AND Content.Active=1
ORDER BY Sort ASC
</cfquery>


<!-- Get Layer 1 Menu--->
<cfloop query="qryGetAllMenu">
        <cfloop query="qryGetMenuBG">
                <cfoutput><li>#qryGetAllMenu.Title# - - 
#qryGetMenuBG.MBFile#</cfoutput>
        </cfloop>
</cfloop>

Ideas? Help - please?

- Nick


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

Reply via email to