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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:28:22+00:00 2026-05-22T01:28:22+00:00

I’ve got a logic-oriented issue, I think. I’m restructuring the database on my site

  • 0

I’ve got a logic-oriented issue, I think. I’m restructuring the database on my site to make it useful to the end user, and it’s looking like this: I’ve got a list of seven products available, and each of them have an id of 1-7. I’ve got a submission table with an auto-incremented Id property (SubmissionId) to identify each unique submission, which may have multiple products (for example, a new customer may submit an add product form with EPL, Crime Fidelity, and Fiduciary), but not redundant products (can’t have EPL and another EPL). I need to be able to link the product Id’s to each submission in a workable way so that I can call it up to display the relevant information when a user calls up the submission to review it (basically like looking at their shopping cart). Obviously it’s not feasible to create a table with all the possible iterations of 1-7 when there aren’t necessarily 7 digits in the final count (because otherwise there would only be 49), so I was wondering if there was a way to combine each product id into a string, or something like it, insert that number into the ProductId column of the Submission table, and then use a SELECT WHERE LIKE statement to call up all the products associated with that particular SubmissionId?

For example, a user submits a new form, and the database autoincrements the value for column SubmissionId as 8. Then they add four products; EPL, Crime Fidelity, Fiduciary and Professional D&O. Those products have respective values of 1,3,4 and 6 in the column “ProductId” in the Product table. The collective ProductId value to be inserted into the Submission table would be 1346, and the logic to display the data associated with SubmissionId 8 would have a switch case statement looping through that ProductId to see if it contained each of the numbers 1-7 using the SELECT WHERE ProductId is LIKE (number), and then displaying the data from the relevant cases. How would I get the “1346” value to insert into the Submission table’s ProductId column?

  • 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-22T01:28:22+00:00Added an answer on May 22, 2026 at 1:28 am

    You should add a table that would link Product with Submission, eg. table S2P { Id, ProductId, SubmissionId } (I can’t come up with better name). This is standard way to implement many to many relationship.

    Check this link: http://www.tomjewett.com/dbdesign/dbdesign.php?page=manymany.php or google for many to many relationship to get more information.

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

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

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.