Re: Help with designing threaded discussion group

From: JOG <jog_at_cs.nott.ac.uk>
Date: 22 Dec 2005 16:41:12 -0800
Message-ID: <1135298472.675456.236860_at_f14g2000cwb.googlegroups.com>


Jakobo wrote:
> Im trying to design a threaded discussion group in an intranet
> application. Basicly i want to design the database and the subsequent
> sql statements so that i put a minimum of workload on the server/client
> handling the application, avoiding looping through large arrays. I want
> to be able to get all the root posts of the group, and unfold one of
> these root posts showing all the underlaying posts in a hierarchical
> tree structure. Have so far planned for following properties of a table
> design (holding a single discussion group); field0 - post id (auto
> number), thread - (post id of root), answer (post id of parent)
> together with other fields reg. the post itself (author, date, subject,
> mess. text).

Having performed this task from scratch several times myself, I have one recommendation to you above all else: look at someone else's code. I once was naive enough to think i could reinvent the wheel (but better of course, superior road traction maybe), and it was only when I downloaded PHPBB and had a look at their source code that I realised just how much I had to learn about engineering even something as relatively simple as a bulletin board.

While I don't use the software any long, head to www.phpbb.net/downloads and take a look at their source. Its free, and it's a good clear structure.

all best, Jim.

> Can anybody please help with idears about how I should design the table
> and/or construct sql statements so that i can retrieve data from a
> record set and put them in a hierarchical structure without having to
> loop through large arrays. Im working in a windows invironment, using
> IIS, mysql, vbscript serverside, jscript clientside.
> regards
> Jakob Outzen
Received on Fri Dec 23 2005 - 01:41:12 CET

Original text of this message