Jump to content

Recommended Posts

i would like to create a query where sc_members.full_name, sc_contributor_list.fullname show up in one result, or to be more specific one column

one is a person one is a church in which the data is stored in different ways but i would like to be able to select from one list without creating a table that combines both names

 

any ideas?

 

SELECT sc_members.full_name, sc_contributor_list.fullname
  FROM njmetrod_njmetro.sc_contributor_list sc_contributor_list,
       njmetrod_njmetro.sc_members sc_members GROUP BY sc_members.full_name AND sc_contributor_list.fullname

Link to comment
https://forums.phpfreaks.com/topic/176957-selecting-one-list-from-2-tables/
Share on other sites

Hi

 

What you need is a JOIN.

 

Something like:-

 

SELECT tab1Col, tab2Col

FROM tab1

INNER JOIN tab2

ON tab1.CommonColumn = tab2.CommonColumn

 

Basically you link the 2 tables together on a common column (ie, your church might have an id column, while your people table might have a column listing the id of their church).

 

If you need more help then just ask, but hopefully you can work the details out from the above.

 

All the best

 

Keith

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.