Upvote system

Hey Guys,
I’ve been trying to implement an upvote system where users can +1 or -1 any given entry to the app.
I have a ratings table that has the id of the entry, whether they upvoted or downvoted (in a user friendly way) and the value that each one means (+1 or -1).
On the entries table I have a column for the sum of upvotes and downvotes but I am struggling to find the formula for it.

Has anyone done something like this?

Maybe this post will give you an idea of how to do it. Make a copy of it and look at the formulas I used.

1 Like