<cfparam name="Var1" default="Dat1">
<cfoutput query="recordset">
#Var1##recordset.Rec1#<br>
</cfoutput>
The above will give you:
Result: Dat1Name1
Dat1Name2
For nesting a <cfoutput> inside a cfoutput associated with a query,
you will need a group attribute.
If your recordset was - (field1, field2, field3, field4)
record1= data1, data2, data3, data4
record2= data1, data5, data6, data7
record3= data8, data9, data10, data11
record4= data8, data12, data13, data14
record5= data8, data15, data16, data17
record6= data8, data18, data19, data20
record7= data21, data22, data23, data24
<cfoutput query="xxx" group="field1">
My group is #field1#<br>
<cfoutput>My data is #field2#, #field3#, #field4#<br></cfoutput>
<br>
</cfoutput>
Output would be:
My group is data1
My data is data2, data3, data4
My data is data5, data6, data7
My group is data8
My data is data9, data10, data11
My data is data12, data13, data14
My data is data15, data16, data17
My data is data18, data19, data20
My group is data21
My data is data22, data23, data24
Al
On Thu, 10 Feb 2005 12:29:53 -0800, Rodger <[EMAIL PROTECTED]> wrote:
> I want to use a <cfoutput> tag inside of a <cfoutput query="xxx"> tag.
> i.e.
> <cfparam name="Var1" default="Dat1">
> <cfoutput query="recordset">
> <cfoutput>#Var1#</cfoutput>#recordset.Rec1#<br>
> </cfoutput>
>
> Assuming: Var1=Dat1, and
> Rec1=Name1, and also Rec1=Name2
> Result: Dat1Dat1Name1
> Dat1Name2
>
> What I am looking for is:
> Dat1Name1
> Dat1Name2
>
> If nesting a <cfoutput> in a <cfoutput query="xxx"> does that, is there
> another way?
>
> Rodger
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194125
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54