Re:List ID?
Probably just using a linked list structure.
Each post has a unique id (database unique autonum is ideal) and a
link identifying the unique number of the post it is a child of... The
ones at the top have no child, so you need a parent link of -1 or
something you can spot.
You list the available threads by searching for posts with a parentid
of -1 (or whatever your flag value was).
When someone selects a thread you search the database for posts
linking back to that one. For each of those you must search for posts
that have them as a parent... etc etc etc....
Root post (id=1 parentid=-1 - or null or something like that)
reply1 (id=2 parentid=1)
replytoreply1 (id=4 parentid=2)
replytoreply1b (id=5 parentid=2)
reply2 (id=3 parentid=1)
reply3 (id=6 parentid=1)
replytoreply3 (id=9 parentid=6)
Rootpost2 (id=7 parentid=-1)
replytopost2 (id=8 parentid=7)
The fun starts when you want to remove posts from the list.. If you're
not careful you can end up with orphans all over the place...
Dodgy.
On Fri, 1 Jun 2001 01:48:08 +1000, Peter May <e...@sale-net.com.au>
waffled on about something:
Quote
>I know how to pick up mail etc from a pop account but does anyone know
>how email servers running LISTSERVES (mailing lists) thread the messages?
>I want to make up for my use a program that goes an picks up my mail and
>stores the messages into a datbase for the email lists I belong to. I
>want them to be group my thread like we can do with news. That way I can
>search and sort via questions etc.
>IE:
>QUESTION
> answer
> answer
> answer
>NEW EMAIl QUESTION
>answer
>answer
>etc etc
>Please CC your replies to nos...@sale-net.com.au
>yes it is a real address I use for news so I can turn it off when it is
>not in use..