sql - Database design and query -


i have requirement have number of sub-topics per main topic. , every sub-topic needs able have n number of comments.

i need have database tables represent structure , query list of sub-topics, , every subtopic comments belong it. have have way know when reached end of comments every subitopic.

could please advise on best design/query this?

i use mysql.

thank much! - alex

i think database design might work:

topic id name  topic_has_topic id parentid childid  comments id comment topicid 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -