linux1880 Posted July 1, 2011 Share Posted July 1, 2011 I am building a poll survey database when user will choose answer from multiple question and before submission he will enter his name and email address. I woulld like to find the votes based on user, who gave vote to which question. so far i made 2 tables: question and answer. questions fields = id, question answers fields = id, answer, question_id, votes Please help me how do i go forward, Thanks Quote Link to comment https://forums.phpfreaks.com/topic/240857-help-me-with-this-poll-survey-database/ Share on other sites More sharing options...
suresh_kamrushi Posted July 1, 2011 Share Posted July 1, 2011 Hi I think you should prepare a separate table for votes. Which is like this: id question_id answer_id voter_email_id/voters_name In this way you can keep track of votes. Quote Link to comment https://forums.phpfreaks.com/topic/240857-help-me-with-this-poll-survey-database/#findComment-1237166 Share on other sites More sharing options...
linux1880 Posted July 1, 2011 Author Share Posted July 1, 2011 Thanks suresh, I really appreceate for your help for my little knowledge, what if i have to keep track of votes for multiple questions ? above sounds fantastic for single question , or am i missing something ? Quote Link to comment https://forums.phpfreaks.com/topic/240857-help-me-with-this-poll-survey-database/#findComment-1237368 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.