Jump to content

Voting system... preventing duplicate votes?


scooter41

Recommended Posts

Hi There,

 

I am just about to start work on a large community based website, whereby a lot of the content is created based on membership voting / rating other members articles / photos / pictures etc....

 

This will probably have a large user base, so I was wondering what the best way to allow only unique votes per user?

 

If I had a table for votes.... with the user ID and articleID for example, this would be fine for a low count, but if there are 20k articles with 20k users... this surely wouldnt be advisable....

 

Does anyone have any thoughts of how to cover this?

 

Cookies I guess is one way, but its not very reliable or fool proof!

Link to comment
https://forums.phpfreaks.com/topic/74496-voting-system-preventing-duplicate-votes/
Share on other sites

Not to mention that a properly indexed MySQL database should be able to handle millions of records.  If you did manage to have so much data that performance really became an issue, you would want to look into maybe pre-calculation or load balancing.

ok perfect, thank you for the reassurance... I wanted to check that was the common way to do it and not just a quick fix...

 

there will be votes on articles, blog posts, images, profiles etc, so i guess I could make a seperate votes table for each category.

 

 

thanks for taking the time to post!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.