It's a headache, please!

Source: Internet
Author: User
Tags php database
This is a headache. thank you !!! In php, how to set the likes function on the message board is all basic. Don't be so difficult !!!, You can add a field to the original reply table to store the number of shards. you can also create a separate table to store the article id and number of shards, thank you !!!
In php, how to set the like function on the message board is all basic. don't make it so difficult !!!
------ Solution --------------------
You can add a field to the original reply table to store the number of shards.
In addition, you can create a separate table to store the number of article IDs and shards.
Both methods are feasible.
The practice is actually very simple. it is just like the article's browsing times, but the difference is that the browsing times are automatically accumulated, while the manual clicking is required.
------ Solution --------------------
I think this is mainly a database design. add a number of field record likes to your message table. you can add one to each click.
------ Solution --------------------
Add a field in the message table, and click + 1.
------ Solution --------------------
Reference:
This eldest brother, can you tell me something specific? I don't know much about entering php just now. please give me more advice.

Let's take a look at php database knowledge first.
------ Solution --------------------
This is a problem in database design. You just need to add a field in your table to store the likes. then, you can check it and find it. it will be OK.

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.