morespamforya
New member
- Local time
- Today, 14:35
- Joined
- Aug 6, 2010
- Messages
- 7
Hi
Just a little help on a seemingly easy question.
Say I have 2 tables.
1. Transactions
2. Clients
Each transaction has two clients. So transaction has client1ID, and client2ID
With one client, I can just make an SQL query to do this:
select t.*, c.name from transactions t, clients c
where c.client1ID = c.ID;
Which will show a client's name stacked against a transaction.
However, with 2 references to the same table, is there anyway to show the name of BOTH references with one query?
Just a little help on a seemingly easy question.
Say I have 2 tables.
1. Transactions
2. Clients
Each transaction has two clients. So transaction has client1ID, and client2ID
With one client, I can just make an SQL query to do this:
select t.*, c.name from transactions t, clients c
where c.client1ID = c.ID;
Which will show a client's name stacked against a transaction.
However, with 2 references to the same table, is there anyway to show the name of BOTH references with one query?