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
Så vil du være i stand til at få adgang til Forfatter, Komponist og Fremhævet, plus alle albumegenskaberne