you could try using group_concat
select Computer.ID, group_concat(harddisk.id) from Computer inner join harddisk on Computer.id = harddisk.computerID group by Computer.ID
548k questions
547k answers
4 comments
86.3k users