Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7061035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:25:29+00:00 2026-05-28T04:25:29+00:00

I would like create simply polls manager (PHP and Apache). I want for example

  • 0

I would like create simply polls manager (PHP and Apache).

I want for example options:

  1. yes or no (boolean in database)
  2. select with own option (?)
  3. answerbox (varchar 5000)

Moderator have option create new pool. He want for example:

  • two yes or no
  • one select
  • two answer box.

How can i keep this in database? I dont have any idea 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:25:30+00:00Added an answer on May 28, 2026 at 4:25 am

    Here is an example of how it can be implemented:

    Two types of questions — select (including yes/no questions) and text:

    question_types
    --------------
    id   type
    --------------
    1    select
    2    text
    

    Table selects stores all options for the select question type:

    selects
    ---------------------------------------------
    id   select_id option_desc
    ---------------------------------------------
    1    1         yes
    2    1         no
    2001 500       optionX
    2002 500       optionY
    

    Table polls stores polls data — row for each answer with reference to selects table for select question. Filled according to your example:

    polls
    -----
    id poll_id type  select_id
    -----------------------------
    10 100     2     1
    11 100     2     1
    12 100     2     500
    13 100     3
    14 100     3
    

    Table answers stores user’s answers. answer column references to selects.id for select questions and to answers_texts.id for texts questions:

    answers
    -----------------------------
    id user poll_row_id answer
    -----------------------------
    1  5000 10          1
    2  5000 11          2
    3  5000 12          2002
    4  5000 13          301
    5  5000 14          302
    

    The answer_texts tables stores answers to the text questions:

     answers_texts
     -----------------
     id  answer
     -----------------
     301 text1
     302 text2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i would like to create a flexible logger class. I want it to be
Can I create a Controller that simply returns an image asset? I would like
I would like to create a little game where user would simply move some
I would simply like to create a file that stays around after the program
I would like to create script, which simply runs ssh-keygen -t rsa . But
I would like to create simple objects at runtime (textbox, label, etc) and add
I would like to create a simple file format/DSL which would allow my users
I would like to create a simple control that inherits from HeaderedContentControl, and has
I would like to create a simple XMPP client in java that shares his
I would like to create a simple designer which looks like visual studio. Specifically,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.