Re: Create a Bulletin Board

From: Date: Wed, 21 Mar 2001 05:47:13 +0000
Subject: Re: Create a Bulletin Board
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44888@lists.php.net to get a copy of this message
Jimmy Bäckström wrote: > > Yo! > I'm thinking of writing a bulletin board and I wonder about threads. I want the board to > be built on threads but I don't know how to do it. I want it to look something like this: > > subject 1 > | > |__ reply1 to 'subject 1' > | | > | |__ reply1 to 'reply1 to subject 1' > | | > | |__ reply2 to 'reply1 to subject 1' > | > |__ reply2 to 'subject 1' > > This is important to me so I'm thankful for any help I can get! > > //Broder I did it this way for a vbulletin/ubb style board which also does threading thread table has in it a coloumn thread_counter messages table has a column thread_order So say there is thread 1 thread counter goes to 1 order is 1 2nd post someone replies to 1 order is 1.2 (2 comes from thread counter) 3rd post - a reply to 2nd post order is 1.2.3 4th post - someone replies to 2nd post order is 1.2.4 and so on and so on so you can get a threaded view in one sql call. Im using postggresql., interbase and sybase and to do the creation of thread orders I use triggers. Working out the ordering directly in php would really suck - you could get problems with concurrent updates. I never considered MYsql because of it's lack of triggers, stored procedures etc etc People say these are uneccessary but I tend to disagree. They save you a ton of clunky php and help speed things up.

« previous php.general (#44888) next »