Please help with PHP forum Nesting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
res_123
Forum Newbie
Posts: 16
Joined: Fri Mar 13, 2009 6:47 pm

Please help with PHP forum Nesting

Post 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
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

Re: Please help with PHP forum Nesting

Post by William »

If I understand you correctly I would just modify your current table.
res_123
Forum Newbie
Posts: 16
Joined: Fri Mar 13, 2009 6:47 pm

Re: Please help with PHP forum Nesting

Post 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:
res_123
Forum Newbie
Posts: 16
Joined: Fri Mar 13, 2009 6:47 pm

Re: Please help with PHP forum Nesting

Post by res_123 »

Anyhelp would be appreciated.

Many Thanks
Post Reply