i creating a shopping website online for a store. and i wanted to add polls to get user input, than store in database.
i wasnt sure how to set up tables.

we going to have alost of questions. each question will have 3 to 4 answers. user can click on answers. onces the user has picked a answer than he/she cant not answer the same question again.

ex
question1: you farvite bread?
answer1: wheat
answer2: white
answer3: grain

question2 ...
answer1: ...
answer2:...

etc...

my idea to keep track of questions and how many times user click on answers:

question table:
-question_id
-user_id
-questions

answer table:
-answer_id
-question_id
-answer

issue iam having is that answer can be 3 or 5 different types.

If you are referring to data types when referring to the answer, if you are using MSSQL, there is a data type called SQL Variant and its common for the use of storing different types of data.

--

no i means how to struct tables.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.