Hi experts,
I have a code which suppose to be create an output with table. however it does'nt..pls help me
<cfparam name="ParentID" default="0">
<cfif IsDefined("Attributes.ParentID")>
<cfset ParentID = Attributes.ParentID >
</cfif>
<cfparam name="OrderBy" default="taskID">
<cfif IsDefined("Attributes.OrderBy")>
<cfset OrderBy = Attributes.OrderBy >
</cfif>
<cfquery name="GetCurrentID" datasource="promanager">
SELECT * FROM tbtask
WHERE taskparent =#ParentID# and projectID="#URL.prID#"
ORDER BY #OrderBy#;
</cfquery>
<!--- Loop through the query and display the taskname information.--->
<table align="left" border="1" cellpadding="" cellspacing="1">
<tr>
<ul>
<cfloop query="GetCurrentID">
<cfoutput>
<td width="700">
<li><font face="Verdana" size="1px"> #GetCurrentID.taskname#</font></li>
</td>
<td width="100">
#GetCurrentID.creatorID#
</td>
</cfoutput>
<!---Query items with ParentID equal to the current taskID.--->
<cfquery name="CheckForChild" datasource="promanager">
SELECT * FROM tbtask
WHERE taskparent = #GetCurrentID.taskID#;
</cfquery>
<!--- If CheckForChild returned records, then recurse sending the current
taskID as the ParentID.--->
<cfif CheckForChild.RecordCount gt 0 >
<tr>
<td width="600">
<cf_prjtask ParentID="#GetCurrentID.taskID#"
OrderBy="#OrderBy#">
</td>
</tr>
</cfif>
</cfloop>
</ul>
</tr>
</table>
Joel,
I have a code which suppose to be create an output with table. however it does'nt..pls help me
<cfparam name="ParentID" default="0">
<cfif IsDefined("Attributes.ParentID")>
<cfset ParentID = Attributes.ParentID >
</cfif>
<cfparam name="OrderBy" default="taskID">
<cfif IsDefined("Attributes.OrderBy")>
<cfset OrderBy = Attributes.OrderBy >
</cfif>
<cfquery name="GetCurrentID" datasource="promanager">
SELECT * FROM tbtask
WHERE taskparent =#ParentID# and projectID="#URL.prID#"
ORDER BY #OrderBy#;
</cfquery>
<!--- Loop through the query and display the taskname information.--->
<table align="left" border="1" cellpadding="" cellspacing="1">
<tr>
<ul>
<cfloop query="GetCurrentID">
<cfoutput>
<td width="700">
<li><font face="Verdana" size="1px"> #GetCurrentID.taskname#</font></li>
</td>
<td width="100">
#GetCurrentID.creatorID#
</td>
</cfoutput>
<!---Query items with ParentID equal to the current taskID.--->
<cfquery name="CheckForChild" datasource="promanager">
SELECT * FROM tbtask
WHERE taskparent = #GetCurrentID.taskID#;
</cfquery>
<!--- If CheckForChild returned records, then recurse sending the current
taskID as the ParentID.--->
<cfif CheckForChild.RecordCount gt 0 >
<tr>
<td width="600">
<cf_prjtask ParentID="#GetCurrentID.taskID#"
OrderBy="#OrderBy#">
</td>
</tr>
</cfif>
</cfloop>
</ul>
</tr>
</table>
Joel,