Page 1 of 1

Please help with PHP forum Nesting

Posted: Thu Mar 19, 2009 10:13 am
by res_123
Hello fellow members:

I want to nest my forum replies....meaning reply to a reply....so want to create a 2 dimensional array with one number refering to the orig post and the other for each reply on that post

Could somebody please help me out.

Thanks in advance

my forum_replies table looks like this....

Code: Select all

 
   
      CREATE TABLE IF NOT EXISTS `forum_replies` (
   
      `id` INT(11) NOT NULL AUTO_INCREMENT,
      `tid` INT(11) NOT NULL,
      `uid` INT(11) NOT NULL,
       `message` TEXT NOT NULL,
       `DATE` VARCHAR(64) NOT NULL,
       `TIME` INT(25) NOT NULL,
       `edit_time` INT(25) NOT NULL,
        PRIMARY KEY (`id`)
        ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=33 ;
 
So will I need to create a new nested table with reply_id or simply modify my current table

Re: Please help with PHP forum Nesting

Posted: Thu Mar 19, 2009 11:04 am
by William
If I understand you correctly I would just modify your current table.

Re: Please help with PHP forum Nesting

Posted: Thu Mar 19, 2009 11:14 am
by res_123
William wrote:If I understand you correctly I would just modify your current table.
Right what I meant is to add a nested feature to my forum topic where a person can reply to a comment not neccessary replying to the topic.....

For example above......your message is in quotes......and I am replying to your comment....

Hope you understand? :lol:

Re: Please help with PHP forum Nesting

Posted: Thu Mar 19, 2009 3:10 pm
by res_123
Anyhelp would be appreciated.

Many Thanks