tags:

views:

25

answers:

1

I have a survey application, where users can create surveys and give choices for every survey. Other users can choose their answers for the aurvey and then polls are taken to get the results of the survey.

I already have the database schema for this

Questions id, user_id, category_id, question_text, date_started

Answers id, user_id, question_id, choice_id, explanation, date_added

Choices id, question_id, choice_text

As for now, users can choose their own choice answers to their surveys... but I want to be able to add a default "I dont care" or "I dont know" choice to every survey for people who simply dont care about the topic to take sides or who cant choose.

So lets say theres a survey that asks who was a better president, George W. Bush, Bill Clinton, Ronald Reagon, or Richard Nixon... I want to be able to add a default "I dont care" option.

I was thinking to just add that extra choice EVERY TIME a user creates a survey, but then I wouldn't have much control over the text for that choice after that survey has been created, and I want to know if theres a better way to do this, like create another table or something

Thanks

A: 

Change your application logic to always display choices that have a null question_id. Then create 1 question with the choice_text of I don't care, and a question_id of NULL.

Byron Whitlock