Hello All-
I realize this is a general database design issue, but it is being
implemented in MySQL so.... I am going to be adding the ability for people
to make comments about certain things on my site (www.gainsay.com) where my
friends and I review albums. For now I do not want to get into actually
programming threaded discussions, however I would like to lay the
groundwork by treating every message for now as a top level message in a
threaded discussion list. So... I am wondering what type of db structrue I
would need. I was thinking of something like this.....
<--->
message | other relevant info | in_reply_to
<--->
I guess this would work by using looping structures in PHP/FI. Something like.
/* Select all messages where in_reply_to is null (or some top level ID)
/* Print Out The Message
/* For Each message select the messages that are in reply to it..
/* Print Replies
However, as you can see I end up with the need for recursion.... and I am
not sure if I can do that with PHP... anyway, I am thinking as I type. Any
ideas?
-Thanks
Stephen
Stephen Johnston
GAINSAY e-zine