Jump to content

Table structure help needed


poirot

Recommended Posts

Hi

I was making a poll thing, but I dont know what is the best way to store data...

Idea #1:

Table "polls":
fields: poll_id, poll_question, poll_options, poll_options_num_votes

being poll_options and poll_options_num_votes serialized arrays.

Idea #2:

Table "polls":
fields: poll_id, poll_question

Table "poll_options":
fields: poll_id_from, option_text, option_votes

Considering a that I may have potentially thousands of polls, thus maybe up to tens of thousands of options, what is the best option?

Thanks [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
Link to comment
https://forums.phpfreaks.com/topic/12243-table-structure-help-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.