Daniel Noll wrote:

Michael McCutcheon wrote:

<snip>
If not, are there any ways of handling scenarios like this without having to do a select for each item?


I would have done this by having a discussion_id / thread_id column.

A discussion generally has properties of its own, so in a full application you would presumably have a discussion or thread table already. Selecting all messages in that discussion then becomes a trivial matter.

Daniel

But then how do you maintain the hierarchy like javalobby?  i.e.:

Topic Begin
 |
 response
 response
   |
   response
   |
   response
     |
     response
     response
       |
       response
     |
     response
     response


Don't you have to have a parent_id on each item?

It seems like what you are suggesting is a 'flat' type of forum (which I did not think about) where all items have the same parent (for a top-level thread), and are shown sorted by date, not by hierarchy. Is that what you are suggesting?

I'm really trying to emulate the behavior of javalobby.

Thanks,

Mike

Reply via email to