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

  • Home
  • SEARCH
  • 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 9020541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:02:42+00:00 2026-06-16T05:02:42+00:00

An input form was designed for me that stores the information in 4 different

  • 0

An input form was designed for me that stores the information in 4 different tables in one database. I now need to recombine these back into one.

The primary table is Paintings

All variable fields actual data is stored in Medium_options

The PID in Paintings and MOID in Medium_options are linked together in Painting_medium

My goal is to write a SELECT statement to combine this data into one $sql statement:

Here is an example of what I have and need.

Any help would be greatly appreciated.

  • 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-16T05:02:44+00:00Added an answer on June 16, 2026 at 5:02 am

    Try this, changing the * to the columns you require (p.size, m.medium_name etc):

    SELECT  *  
    FROM    paintings AS p  
            INNER JOIN painting_medium AS pm  
                ON p.pid = pm.pid  
            INNER JOIN medium_options mo  
                ON pm.moid = mo.moid
            INNER JOIN medium m
                ON mo.medium_id = m.medium_id
    

    So your first line would be along the lines of:

    SELECT  p.category AS Category
           ,mo.medium_option AS Size
           ,m.medium_name AS Material
    FROM   paintings AS p  
    etc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to create a custom input form that collects employees hours. This data
I want to create an input form that will take the input text and
I'm having some trouble with a form designed to insert fixtures into a database
I am attempting a very simple form designed to take user input into a
I have a form designed which takes input values. I want people to click
I have this input form which goes like this: <input type=checkbox name=vehicle value=Bike />
I have an input form with two textareas allowing a user to type in
Here is the input form code <tr valign=top> <td align=right class=innertablestyle><font class=normal><strong>Homepage</strong></font></td> <td>&nbsp;</td> <td>
I have a complex input form within a PHP based web application. To structure
I am trying to make an input form have a background image, but as

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.