I have managed to create a forum, but i have a problem in that i am trying to get a stepped affect.
It is stepped at the moment, but all parent replies & sub-replies etc. tend to get grouped together. i.e. a child reply doesn't necessarily appear below its parent, even though it maybe indented.
The relevant fields in the table are as follows:
commentID(a unique identifier)
replyflag( to identify what level of reply it is
& therefore how much to indent that comment)
parentID ( which refers to the commentID of the very
top level comment)
realparentID ( which refers to the commentID of the
real parent of a comment)
Any suggestions as to how i can get a stepped affect when i make a call to the table.
At the moment i am doing something like this:
<!---commentIDArray contains all the top level commentID's, i.e. root comment--->
<cfloop from=1 to= ArrayLen(commentIDArray) index=i>
<cfquery name=baba datasource = blacksheep>
SELECT *
FROM commentstable
where parentID = '#commentIDArray#' AND replyflag >1;
</cfquery>
</cfloop>
And to top it all of all the above is within a <cfoutput> already.
Thanx in advance.
It is stepped at the moment, but all parent replies & sub-replies etc. tend to get grouped together. i.e. a child reply doesn't necessarily appear below its parent, even though it maybe indented.
The relevant fields in the table are as follows:
commentID(a unique identifier)
replyflag( to identify what level of reply it is
& therefore how much to indent that comment)
parentID ( which refers to the commentID of the very
top level comment)
realparentID ( which refers to the commentID of the
real parent of a comment)
Any suggestions as to how i can get a stepped affect when i make a call to the table.
At the moment i am doing something like this:
<!---commentIDArray contains all the top level commentID's, i.e. root comment--->
<cfloop from=1 to= ArrayLen(commentIDArray) index=i>
<cfquery name=baba datasource = blacksheep>
SELECT *
FROM commentstable
where parentID = '#commentIDArray#' AND replyflag >1;
</cfquery>
</cfloop>
And to top it all of all the above is within a <cfoutput> already.
Thanx in advance.