How to use PHP to develop a blog comment system! Solution

Source: Internet
Author: User
How to use PHP to develop a blog comment system! I just learned PHP and used my knowledge to create a simple blog. now I can post an article and use the message board function. now I want to build a blog comment system! It is the comment below every article! All I know is that we can build a message board under every article like building a message board. this is like commenting on how to use PHP to develop a blog comment system!
I just learned PHP and used my knowledge to create a simple blog. now I can post an article and use the message board function. now I want to build a blog comment system!
It is the comment below every article!

All I know is that I can build a message board under every article like a message board. this is like a comment system, but in this case, this is equivalent to creating a database table for every article. this is not realistic!

There should be a more reasonable method. please give me some advice !!!

------ Solution --------------------
Create a comment table
The Id of the article commented on by the pid. Retrieve and query from the article table
Content comment
Time comment time
SQL code
Create table comment ('id' MEDIUMINT AUTO_INCREMENT, 'pid 'MEDIUMINT, 'content' VARCHAR (250), 'Time' INT (10), primary key ('id '), INDEX ('pid '))
------ Solution --------------------
The topic has an id, and the reply is associated with the topic.
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.