I have this query to grab all requests by user_id and grabbing the profile names from the profile_id’s that are associated with the records retrieved.
SELECT Requests.request_id,Requests.user_id,Requests.profile_id,Requests.job_title,Requests.date,Requests.time,Requests.info,Requests.approval, Profile.first_name, Profile.last_name FROM Requests, Profile WHERE user_id = '$user_id' AND Requests.profile_id = Profile.profile_id ORDER BY approval ASC
What if I wanted to add another table to retrieve the names of the user_id from the Accounts table?
I think using joins would be a nice idea because it is more lucid.