ok...so i have a simple query:
SELECT item_id,
TYPE , college_type
FROM portfolio
WHERE user_id =3
I would like to JOIN this query onto 4 other tables depending on the value of TYPE so that i can get a field TITLE from one of 4 other tables.
in other words:
for each record
if type=college then LEFT JOIN on table1 where table1.item_id=portfolio.item_id
if type=career then LEFT JOIN on table table2 where table2.item_id=portfolio.item_id
etc.
in other words, the title for each record will come from a different table depending on the value of TYPE in the table called 'portfolio'.
can this be done in a query? i'm working at it but don't know where to put the logic.