I think this should work...
SELECT
b.Name AS "Boss name",
ad.Name AS "Admin name",
as.Name AS "Assistant name"
FROM Projects AS pr
LEFT JOIN
People AS b
ON b.ID = pr.Boss_ID
LEFT JOIN
People AS ad
ON ad.ID = pr.Admin_ID
LEFT JOIN
People AS as
ON as.ID = pr.Assistant_ID
WHERE pr.Project_ID = 5
I have a table of projects with several columns for the IDs of some
people in various roles, and then a table of the people. How can I get
all the people for a given project, but keep their roles straight?
Projects
--
Project_ID
Boss_ID
Admin_ID
Assistant_ID
People
ID
Name