How to update users total points in mysql
So I have a website where users submit posts where the posts can be upvoted or downvoted. 

At the moment a users total earned points from all of his posts is not saved.

What is the best/common way to do this? How does a site like Reddit or StackOverflow do it?

Should I be adding and subtracting from the total user points every time someone votes on a post.

Thanks
How to update users total points in mysql
===

So I have a website where users submit posts where the posts can be upvoted or downvoted. 

At the moment a users total earned points from all of his posts is not saved.

What is the best/common way to do this? How does a site like Reddit or StackOverflow do it?

Should I be adding and subtracting from the total user points every time someone votes on a post.

Thanks