List:General Discussion« Previous MessageNext Message »
From:Stephen F. Johnston Jr. Date:April 8 1999 10:20pm
Subject:Disucssion Database in MySQL
View as plain text  
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 ( 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


Stephen Johnston
GAINSAY e-zine

Disucssion Database in MySQLStephen F. Johnston Jr.9 Apr
  • Re: Disucssion Database in MySQL - code releasePeter F. Brown9 Apr