I know this has to have a simple solution and I am not seeing it.
I have a table,
person, which contains all information about each person such as first name, last name, age, address.
I have a second table called
consumer_client which contains a row containing person id for each consumer and client like this:
id | consumer_person_id | client_person_id
What I want is to fetch both full names when I join
client_consumer like this:
id | Joe Mama | Mike Smith
I cannot seem to get that with a simple JOIN syntax like
SELECT * FROM person JOIN client_consumer WHERE person.person_id = cc.person_id
as it always returns just the
client_person_id along with other information in person. I want it replaced with the full name instead of