A unique ID for a poll response

imappejoini

New Member
In my system a manager create a poll and publish it to the world so users which have the link to the poll can answer it.There is some question which designed to receive multiple answers, so user can choose multiple distract in one response.The response table structure in the DB
  • ID
  • ActivityID - the poll ID
  • Value - the district value
  • TimeResponse
In the database i am currently saving each response separately.I will give you an exampleLets say there is 4 district in a poll (a,b,c,d)User choose the following district (a,b,c)The response table will look like this:\[code\] ID ActivityID Value TimeResponse 1 234 a 01/01/2012 2 234 b 01/01/2012 3 234 c 01/01/2012\[/code\]So if i try to count the ID i will get the number 3 which represent the number of district were answered is a given poll.BUT i need the number of responses per user in a given poll, so i need somehow to combine those two...Until now i thought about the following solutions but neither of them is good.
  • the first solution was to add a column of the user's IP, but sometimes i cant get the user's IP.
  • the second solution was to add a column of the user's sessionID using the sessionIDManager, but if the user answer twice (2 response) it will store the same session ID.
FYI, the user which answer the poll is anonymous.
 
Back
Top