开发者

Poll system multiple answers

开发者 https://www.devze.com 2022-12-17 02:04 出处:网络
If you would want to make a poll system that supports multiple answers (options) (not just yes/no) how would you do it? How would you structure the db etc?

If you would want to make a poll system that supports multiple answers (options) (not just yes/no) how would you do it? How would you structure the db etc?

I don't want to limit the answers/options.

Some input on开发者_JAVA技巧 this would be greatly appreciated.


Here is what I used:

Pool table:

pool_id: int
pool_name: varchar
number_of_votes: int

Pool_question table:

question_id: int
pool_id: int
question: varchar
answer: varchar
question_selected_count: int
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号