I can't seem to find a way to do this.
I have two tables, one a user table that has multiple types of users (soloist, bands) and a table that has band members. Also a soloist can be a member of multiple bands. The band members are connected to the bands with an unique User table ID. What I want to do is perform a search for a person, let's say John Doe and have his listing as a soloist and for each of his bands appear with the band name. So:
User Table:
_________________
ID | Name | Type|
1 | John Doe | Solo |
2 | The Doe's | Band |
3 | Doe Ray's | Band |
_________________
Band Member Table:
_________________
BID | ID | Name |
1 | 2 | John Doe |
2 | 3 | John Doe |
_________________
A search for "John Doe" would result in:
John Doe - Soloist
John Doe - The Doe's
John Doe - Doe Ray's
Any ideas? Thanks.