ed
Member
Registered: 10th Sep 03
User status: Offline
|
Extra table that stores the id of the user voting and the id of the poll. When you vote you get added to the table and if you try to vote again then a script will check the table and prevent your vote from being cast. It would be backwards compatible with previous polls, but it would allow you to vote one more time on polls where you have already made a vote. Boom.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
If you're worried about filling the DB up with useless data, you could set it so that polls have a lifetime. When they have exceeded their life a CRON job will close the poll and delete all the records regarding that poll, only keeping the results.
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
quote: Originally posted by Cosmo
Does it matter about the old polls?
Not really but if I was converting the last few months worth I may as well do them all. Its converting them that doubled the size of the job.
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
quote: Originally posted by ed
Extra table that stores the id of the user voting and the id of the poll. When you vote you get added to the table and if you try to vote again then a script will check the table and prevent your vote from being cast.
Yes, this is the solution.
|