You could use a cfloop for the inner query.

-----Original Message-----
From: Paul Sinclair [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 5:18 PM
To: CF-Talk
Subject: No <cfquery output> within <cfquery output> - but I need to


I am setting up a form page that requires a drop down selection box. The
dropdown box is generated dynamically in a <cfoutput query> section. But the
dropdown box is itself to be inserted within another <cfoutput query>
section of the page.

I've tried using <cfset> above the first <cfoutput> section to make a
variable that I can embed with the second <cfoutput> section. The problem
with that is I can't do a <cfoutput> within the <cfset> tag to set up the
variable (at least I don't think I can.)

What I want to do is something like this:

=== START CODE SAMPLE ===
<cfquery name="outsideQuery" datasource="dsn">
select *
from tblA
</cfquery>

<cfquery name="embeddedQuery" datasource="dsn">
select *
from tblB
</cfquery>

<form action="actionPage.cfm" method="post">
<cfoutput query="outsideQuery">

Member Name: 
<input type="text" name="nameFld" value="#nameFld#">

Member Level:

<!------ Need the dropdown box here ----->
<select name="this">

<cfoutput query="embeddedQuery">
<option value="#fldID#">#fldName#
</cfoutput>

</select>

</cfoutput>

</form>
=== END CODE SAMPLE ===


Any ideas how to cram the dropdown box in there?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to