Hi there i have a table:
Teams: as below
|Team ID | Member ID|
| 1 | 10 |
| 2 | 230 |
| 1 | 11 |
| 4 | 56 |
| 1 | 15 |
| 2 | 236 |
| 1 | 18 |
| 3 | 43 |
| 1 | 17 |
I did this to find the members of a team:
SELECT members from teams where team_ID = 1; and it gave me 10,11,15,18,17
I have a different table for each member .So I tried something like this to fetch the data from different tables and it worked fine:
SELECT * FROM 10
UNION ALL
SELECT * FROM 11
UNION ALL
SELECT * FROM 15
UNION ALL
SELECT * FROM 18
UNION ALL
SELECT * FROM 17
Is it possible to make this 2 Queries into 1 Query because the members of a team changes dynamically....
Any help please...
Let me be bit more clear: My final result should only contains data from different member tables. Hope I am clear..