SJames Posted September 2, 2007 Share Posted September 2, 2007 Hi, I'm writing a post/comment system. In it, users have the ability to either add or subtract 1 point from a comment's "score". I am trying to figure out the best way to do it. I think my options are to either store what every user has done to every comment in a database, but this seems like it would get unmanageable very quickly. My only other option that I can think of is to save what the user has done to a comment in a cookie, but this still seems like there would be massive amounts of cookies stored, and the user could make multiple changes to the comment's score by simply erasing the cookies and doing it again. Are there any other ways of doing this sort of thing? If not, which option would you suggest, and would the best way of going about doing it? Quote Link to comment Share on other sites More sharing options...
trq Posted September 2, 2007 Share Posted September 2, 2007 Wouldn't there only be a need for one score per comment? Users then simply add or minus this one score. You probably need to be a little clearer in your explination, but thats what I read. Quote Link to comment Share on other sites More sharing options...
SJames Posted September 2, 2007 Author Share Posted September 2, 2007 The way it's supposed to work is that each user can only add or subtract 1 point from the score. If all I had was a single score, than there would no way to regulate how many times each user modifies the score. I'm askig what the best way to regulate it is. Quote Link to comment Share on other sites More sharing options...
Azu Posted September 2, 2007 Share Posted September 2, 2007 The way it's supposed to work is that each user can only add or subtract 1 point from the score. If all I had was a single score, than there would no way to regulate how many times each user modifies the score. I'm askig what the best way to regulate it is. Have a column in your post/comment table that holds the score, and one that lists the people who have already voted and can't vote again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.