hi
i have 2 cfquery and i want them to be in one cfoutput in a
page, can
anyone help?
before that, my DB column is :
member_ID | member_Name | upline_ID | memberType
____________________________________________________________
<cfparam default="001"
name="currentMember"
type="integer">
<cfparam default=""
name="downlineList">
<cfquery datasource="moy-network"
name="get_Downline">
SELECT
member_ID
FROM
tbl_member
WHERE
upline_ID = '#currentMember#'
</cfquery>
<cfoutput query="get_Downline">
<cfset downlineList = downlineList &
"'" & "#member_ID#" &
"'" & ",">
</cfoutput>
<cfquery datasource="moy-network"
name="get_2ndLevel_Downline">
SELECT
COUNT(member_ID) AS totalDownline
FROM
tbl_member
WHERE
upline_ID
IN (
<cfoutput>#preservesinglequotes(downlineList)#</
cfoutput>
)
GROUP BY
upline_ID
</cfquery>
____________________________________________________________
___
and the final output will be:
<cfloop query="xxx">
<cfoutput>
<tr>
<td>#member_ID#</td>
<td>#member_Name#</td>
<td>#member_Type#</td>
<td>#totalDownline#</td>
</tr>
</cfoutput>
</cfloop>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "ColdFusion" group.
To post to this group, send email to ColdFusion googlegroups.com
To unsubscribe from this group, send email to
ColdFusion-unsubscribe googlegroups.com
For more options, visit this group at http://grou
ps.google.com/group/ColdFusion
-~----------~----~----~----~------~----~------~--~---
|