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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:10:26+00:00 2026-05-20T05:10:26+00:00

I have an e-commerce MySQL database with the following tables: **Product** ———- productID –

  • 0

I have an e-commerce MySQL database with the following tables:

**Product**
----------
productID - 1
categoryID - 1
productName - Cricket Bat



**prodOptions**
----------
optionID - 1
productID - 1
optionName - Bat Size

<PK>optionID - 2
<FK>productID - 1
optionName - Bat Weight


**optionValues**
----------
optionValuesID - 1
optionID - 1
optionValue - Small

optionValuesID - 1
optionID - 1
optionValue - Heavy



**orders**
----------
orderID - 1
custID - 1


**orderContent**
----------
orderID - 1
orderContentID - 1
prodID - 1
optionNameID - 1,2
optionValuesId - 1,2

As you can see, each cricket bat has multiple options. How can I store all of the options in the order content table without entering two or more ID numbers in a row?

  • 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-20T05:10:26+00:00Added an answer on May 20, 2026 at 5:10 am

    Add in a new orderOptions table, which contains a row for each option selected:

    **orderOptions**
    ----------------
    orderId - 1    optionId - 1   optionValue - 1
    orderId - 1    optionId - 2   optionValue - 2
    

    Thus orderId can appear twice (or more) in this table; PK is the combination of orderId and optionId.

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

Sidebar

Related Questions

I have a database for an E-commerce storefront. MSSQL 2008. I have a table
This is probably the most classic database problem. I have an E-commerce software solution
I'm building an e-commerce website. I have a Product and Order models. It's possible
I have written a xml/php document that is pulling from a Magento Commerce database,
I have an ASP.Net website which uses a MySQL database for the back end.
I've been following the 'Netbeans E-Commerce tutorial', and have am currently on this step:
I have an e-commerce application that is exhibiting strange behavior. The product is a
I have an MS SQL Server with a database for an E-commerce storefront. This
i have the following URL (originally generated from SEO toolin OS Commerce) http://www.mydomain.com/-some-name-s-34567.html i
I create a database for E-commerce. I have one thing doing it wrong and

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.