How to deal with the functional code of a blog-php Tutorial

Source: Internet
Author: User
How can I create a comment on the table of a blog based on the function code of a blog when I add an article ?? Let's talk about your ideas. I mean to add the corresponding table at the same time when adding an article ?? ------ Solution -------------------- the trigger function in the database can implement your idea. But what I don't understand is why you don't create a comment table to store the article id and comment content. When obtaining comments from an article, use the functional code of the article about a blog.
When adding an article, how can I create a comment on the table of the article based on this article ?? Let's talk about your ideas.




I mean, when adding an article, add the corresponding table at the same time ??

------ Solution --------------------
The trigger function in the database can implement your ideas.
But what I don't understand is why you don't create a comment table to store the article id and comment content. When you get a comment on an article, you cannot get the comment based on the article id.
Why does an article correspond to a comment table?
------ Solution --------------------
If you do that. The database will pop up.

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.