How to design a forum comment form? Mysql

Source: Internet
Author: User
Only design comments, user tables and so on. One person comments, another reply, then comment, and then reply


Reply to discussion (solution)

Don't know what your comments and responses mean
Since it is a forum, there must be a main post, all comments and replies are for the main (now popular style) so comments and replies should contain the ID of the main posts
If you need comments and responses for a comment and reply, you also need to include the corresponding ID for the comment and reply (this style is a tree form used in earlier forums)

Don't know what your comments and responses mean
Since it is a forum, there must be a main post, all comments and replies are for the main (now popular style) so comments and replies should contain the ID of the main posts
If you need comments and responses for a comment and reply, you also need to include the corresponding ID for the comment and reply (this style is a tree form used in earlier forums)


Just like csdn, I post, you comment on me, I reply you again, you reply to me again. This kind of data table how to design, do not understand

CSDN is the first solution.
ID Unique identification Word
The ID of the PID main stick
Other fields that you need

Can still be divided into two tables
Id
Other fields that you need

ID Unique identification Word
The ID of the PID main stick
Other fields that you need

The above can be said to drop, the main stick to have an ID, this ID is the main sticker ID in the comment, so that can be linked together
Another way is to build the building, you can press the time, but it is best to add a field, is the ID of the floor

Primary KEY comment Person ID reviewer ID timestamp comment content

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.