if you want to use a variable from a query outside the current query loop
then you need to assign that value to a new variable.
<cfoutput query="query1">
#query1.ID#:<br>
<cfset thisId = query1.id>
<cfloop query="query2">
#thisId#<br>
#query2.ID#<br>
<br>
</cfloop>
</cfoutput>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: 07 March 2003 15:02
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] cfoutput cfloop
>
>
> make sense of this:
>
> <cfoutput query="query1">
> #query1.ID#:<br>
> <cfloop query="query2">
> #query1.ID#<br>
> #query2.ID#<br>
> <br>
> </cfloop>
> </cfoutput>
>
> displays something like (where query1.ID = 5 in the outer loop):
>
> 5:
> 1
> 1
>
> 5:
> 1
> 2
>
> 5:
> 1
> 3
>
> not as expected:
>
> 5:
> 5
> 1
>
> 5:
> 5
> 2
>
> 5:
> 5
> 3
>
> eh? is there some bug where I can't use cfloop query inside cfoutput
> query? actually, this sounds kind of familiar, so if someone
> knows the
> details that would be cool (CF 4.5).
>
>
> Duncan Cumming
> IT Manager
>
> http://www.alienationdesign.co.uk
> mailto:[EMAIL PROTECTED]
> Tel: 0141 575 9700
> Fax: 0141 575 9600
>
> Creative solutions in a technical world
>
> ----------------------------------------------------------------------
> Get your domain names online from:
> http://www.alienationdomains.co.uk
> Reseller options available!
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
> .
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]