Jump to content

Finishing A Discussion Board?


justlukeyou

Recommended Posts

Hi,

 

I am in the process of creating a discussion board.  The have section in which someone can ask a question and add notes.  However, I am slighlty stuck on the reply section.  So I can display the question and notes.

 

I was planning to add fields "Answer 1" then "Answer 2" then "Answer 3" etc.  However, means I have to create upto 100 fields and create response boxes for each one.

 

Does anyone know if there is a simpler way to do this? 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/229353-finishing-a-discussion-board/
Share on other sites

We have discussions on this board that have thousands of replies, do you really think they are all stored alongside the initial question? No.

 

You need to relate a 'post' to a reply. So, all posts have an id and parent_id column. Original posts have a parent_id of 0 while replies to posts have a parent_id that is equal to the original posts id.

 

This is a simple relationship.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.