+ 2

How to store likes and dislikes of posts in database? or what is the efficient way to store it?

In sql DB i can store it as like_dislikes user-id | post_id | like | dislike | -------------------------- 1 |2 | 1 | 0 | __________________________| 1 | 3 | 0 | 1 | _______________________ ___| LIKE=1 Dislike=0 same user with the user_id = 1 has liked and disliked post's 2 and 3 or is there any better way ?

8th Nov 2020, 2:30 PM
Vijay(v-star🌟)
Vijay(v-star🌟) - avatar
2 Respostas
+ 3
Thank you soo much 「HAPPY TO HELP」 ur answer was really helpful to me
15th Nov 2020, 6:03 PM
Vijay(v-star🌟)
Vijay(v-star🌟) - avatar