Need help with JOIN label

draelius

New Member
I have a simple registration app with four tables, as follows:

fab_profiles (company employees)
id | date_time | name | executive_id (fk -> fab_executives[id])

fab_executives (managers that employees report to)
id | date_time | division | executive_name

fab_events (company events)
id | date_time | event_name | date | location

fab_requests (employee requests to attend events)
id | date_time | profile_id (fk -> fab_profiles[id]) | executive_id | event_id (fk -> fab_events[id])

I have it setup where fab_requests is joined to fab_profiles and the data pulls over correctly, but I need executive_id label to be executive_name from fab_executives. Currently, the only thing I can get it to display is fab_executives.id. I think it's because that's all I'm storing in fab_profiles.

Is there a way to pull the label from a third table or should I just store the name in fab_profiles?

It seems redundant, I know, but I need to be able to keep a record of the managers employees roll up to at the time of the request and since these are subject to change, it could result in incorrect legacy data.

Hope this makes sense.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top