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.