The Little Guy Posted December 5, 2008 Share Posted December 5, 2008 My site will have images, games, videos. I am adding a voting system to each. Now each user can only vote one time per image/game/video, but he/she can change their vote after 24 hrs from their last vote on that particular item. So, to my question: Would you place the voting information in multiple tables, all have the same value, just one table for images, one for games, and one for video. OR Would you place them all in one table, and have an extra column telling what this is a vote for (image, game, video) OR Would you do something else? Quote Link to comment Share on other sites More sharing options...
VBAssassin Posted December 9, 2008 Share Posted December 9, 2008 Haha, this brings back some memories! I started by saving votes (and comments, etc) all in separate tables... bad idea. Save them in 1 table and simply differentiate them using an enumeration. Then simply write a class to handle the votes system. Save a timestamp with each vote so votes can be removed after 24 hours ;-) I'm actually upgrading my voting system to "reviews" :-) Kind regards, Scott Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 9, 2008 Author Share Posted December 9, 2008 Cool thanks! That is what I was planning on doing! If someone votes otherwise please let me know! 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.