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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:30:58+00:00 2026-06-05T07:30:58+00:00

https://i.stack.imgur.com/mbUTI.jpg I want to Do a multi select in one query where one table

  • 0

https://i.stack.imgur.com/mbUTI.jpg

I want to Do a multi select in one query where one table has data from many tables.
i have four tables to combine it into a single output.
here is a image of my table.

i want to select all and don’t want other data from other table just main table with name of all other tables

have tried following but its not working.

    select * from project_content 
    left Join project_master on project_master.id =  project_content.p_id
    left Join project_content_menu on project_content_menu.type_id =  project_content.p_c_id 
    left Join project_menu_master on project_menu_master.id =  project_content.m_id 


    select * from project_content 
    left Join project_master on project_master.id =  project_content.p_id
    left Join project_content_menu on project_content_menu.type_id =  project_content.p_c_id 
    left Join project_menu_master on project_menu_master.id =  project_content.m_id 


    select distinct(*) from project_content 
    left OUTER Join   project_master on project_master.id =  project_content.p_id
    left OUTER Join   project_content_menu on project_content_menu.type_id =  project_content.p_c_id 
    left OUTER Join  project_menu_master on project_menu_master.id =  project_content.m_id 

    select * from project_content ,project_master,project_content_menu,project_menu_master
    where project_master.id =  project_content.p_id and project_content_menu.type_id =  project_content.p_c_id and project_menu_master.id =  project_content.m_id 

    select pc.id as id , pm.name as pname , pmm.name as menuname , pcm.name as contentname , pc.name as name
    from 
    project_content as pc,
    project_master as pm,
    project_content_menu as pcm,
    project_menu_master as pmm
    where 
    pm.id = pc.p_id 
    and 
    pcm.type_id = pc.m_id
    and 
    pmm.id = pc.p_c_id
  • 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-05T07:30:59+00:00Added an answer on June 5, 2026 at 7:30 am

    If I undesrtood you correctly, you want the data just from the main table, but with names instead of foreign keys from other tables? If so, then:

    SELECT pc.id, pm.name, pcm.name, pmm.name, pc.name, pc.desc, pc.thumb, pc.src, pc.status
    FROM project_content AS pc
    LEFT JOIN project_master AS pm ON pm.id =  pc.p_id
    LEFT JOIN project_content_menu AS pcm ON pcm.type_id = pc.p_c_id 
    LEFT JOIN project_menu_master AS pmm ON pmm.id = pc.m_id 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two grayscale Png files( https://i.stack.imgur.com/8RGh4.jpg ) that I want consider as a
I am interested in retrieving this type of link from maps.google.com https://i.stack.imgur.com/2rInK.jpg At the
Please look to this picture https://i.stack.imgur.com/A2RB2.jpg i want to get sum of money in
this is my layout (image): https://i.stack.imgur.com/wPx04.jpg What I want to do is make the
https://i.stack.imgur.com/ZfB0c.jpg Hi everyone, I've been learning MySQL (exclusively, no experience with PHP yet) from
I need to write this program using a loop https://i.stack.imgur.com/gko6T.jpg this is what i
https://i.stack.imgur.com/FZyiq.jpg I've designed this layout and it works fine in my mind, but when
https://i.stack.imgur.com/3T1rj.jpg So I know how to recursively print a tree with 1 l and
I can't post images yet: https://i.stack.imgur.com/dJio5.jpg Using Actionscript 3 I'm drawing multiple Shapes onto
I have a plot like this: https://i.stack.imgur.com/zdike.png I need the data coordinates of points

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.