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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:19:31+00:00 2026-06-15T12:19:31+00:00

I’ve been trying to figure out how to create links between different tables and

  • 0

I’ve been trying to figure out how to create links between different tables and am having no luck at cracking the mystery. The more I learn the more I question what questions I should be asking. I made some table diagrams to show what I’m trying to achieve…

I have a shirts table which looks like this:

shirts table

Notice in the columns labeled “qp_price” and “o_price” I have text instead of prices, that’s because I want to connect it to this table:

price list

The values of the “qp_price” and “o_price” are equal to one of the values in the “price_cat” column in the price table. This is my way of trying to simplify price management in the future. In the shirts table you’ll see there are repeated values which is because they cost the same price, besides just the men’s shirts there will be women’s crewnecks, boys, girls and babies. I want to link them into a new shirts table where it results like this:

master shirts

I was also wondering about indexes and if it would be better to create this as an index:

shirts index

then inject it into the shirts_master table however you do it and add the “clr_options” and “qty” columns on to the shirts_master table. I want it organized with the two different prices because I have two types of custom services that will call to the appropriate column. In the end I still want the shirts and price tables individual, just linked onto another table so I can update them and have it automatically read it in the master table through the link. What would be the smartest way to put this together?

  • 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-15T12:19:33+00:00Added an answer on June 15, 2026 at 12:19 pm

    Not really sure what you want to do, but you can get your shirts_master with a simple join

    select s.shirt_id, s.shirt_name, s.shirt_type, s.shirt_size,
           qp.price as qp_price, o.price as o_price, s.clr_options, s.qty
    from shirts s
    join price_list qp on qp.price_cat = s.qp_price
    join price_list o on o.price_cat = s.o_price;
    

    If you want this as a view, you can create it with

    create view shirts_master as
    select s.shirt_id, s.shirt_name, s.shirt_type, s.shirt_size,
           qp.price as qp_price, o.price as o_price, s.clr_options, s.qty
    from shirts s
    join price_list qp on qp.price_cat = s.qp_price
    join price_list o on o.price_cat = s.o_price;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm trying to create an if statement in PHP that prevents a single post
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:

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.