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 8271499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:51:47+00:00 2026-06-08T06:51:47+00:00

Could someone advise me on proper SQL architecture for this problem: I am creating

  • 0

Could someone advise me on proper SQL architecture for this problem:

I am creating an app that has a dynamic number of options (option 1, option 2, option 3, etc…). I want the user to be able to select one of those options which will then increment a number associated with that option. How can I achieve a dynamic table, as I obviously can’t pre-define 4 tables, for example, and have each be an option.

Thanks in advance.

  • 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-06-08T06:51:50+00:00Added an answer on June 8, 2026 at 6:51 am

    It sounds like you’re looking for a table like

    CREATE TABLE `options` (
        option_id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
        name VARCHAR(255),
        occurrences INT UNSIGNED
    ) ENGINE=InnoDB;
    

    You can then run a query like:

    UPDATE options SET occurrences = occurrences + 1 WHERE option_id = ____;
    

    (Filling in the option_id based on what the visitor selected.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am missing something in my SQL query, could please someone advise how to
I am not sure if this is possible, but maybe someone could advise. We
Please could someone advise me regarding this. I am currently using the accordion plugin
Could someone please advise a free GUI editor (GUI designer)? This question was asked
Could someone please advise me how i could make this code more generic? I've
Could someone advise me why I am only getting true result, even though that
Could someone please advise me if this is possible. I am looking at a
Hi hope someone can advise I have a sql query that went it runs
Could someone please advise the current best practice around Date and Calendar types. When
Could someone please advise? If const in C++ defaults to internal linkage, why do

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.