nikefido Posted June 26, 2008 Share Posted June 26, 2008 Hey, I was thinking for a voting system - in terms of how to record votes in a database. Would you suggest using a new entry per vote, or having a one entry with an updatable entry? (or other way) Link to comment https://forums.phpfreaks.com/topic/112107-voting-system-database-setup/ Share on other sites More sharing options...
Stooney Posted June 26, 2008 Share Posted June 26, 2008 Your best bet would be to download some of the more popular voting scripts and study their code/database design. You would have to be more specific on how you want it to work. Is it public voting or do you require a user to be logged in to vote? Things like that. Link to comment https://forums.phpfreaks.com/topic/112107-voting-system-database-setup/#findComment-575552 Share on other sites More sharing options...
lemmin Posted June 26, 2008 Share Posted June 26, 2008 It depends on what information you are trying to save. If you simply want a poll and no other information, it makes no sense to save each individual vote, but if you have a user system where a user can vote on multiple polls and want to save that information, you probably want a separate table to store who has voted, but the poll itself probably doesn't need anything more than an update. Link to comment https://forums.phpfreaks.com/topic/112107-voting-system-database-setup/#findComment-575564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.