*** news.btopenworld.com escribió/wrote (17:09:34 27/10/2003):
I'm trying to understand the math or 'how it works' with threaded
posts and such.
I'm using a MySQL table with like id's, subid, etc..
Can anyone point me in the right direction or give me a brief
'overview' on how it works.
Basically, it's all about trees (a kind of graph). You should find some
general info in any programming theory book. You have a collection of
nodes with a special attribute (pointer, branch... whatever name you
give it) that links them with other nodes. As for a forum, having
"message_id" and "parent_id" is probably enough (root messages will
have a NULL parent_id). As for dealing with trees, the best approach is
using recursive function.
Please note I've never written a forum myself and my theory might be
pretty rusty.
--
--
-- Álvaro G. Vicario - Burgos, Spain
--