SELECT a.*,
CONCAT(p.firstname, ' ', p.lastname) AS Author,
CONCAT(p1.firstname, ' ', p1.lastname) AS Composer,
CONCAT(p2.firstname, ' ', p2.lastname) AS Featured FROM albums a
INNER JOIN people p ON a.idauthor = p.id
INNER JOIN people p1 ON a.idcompositor = p1.id
INNER JOIN people p2 ON a.idfeat = p2.id
where a.idalbum=:id
Då kommer du att kunna komma åt Författare, Kompositör och Utvalda, plus alla albumegenskaper