MySQL complex join - Can't select multiple columns in second table
Computers:
----------
id, cond, type
Images:
-------
id, foreignid, name, width, height, def
SELECT
id, cond, type,
(SELECT name, width, height FROM images WHERE foreignid = computers.id ORDER BY def DESC LIMIT 1) AS image
FROM computers
Operand should contain 1 column(s)
select c.id, c.cond, c.type, i.name, i.width, i.height from computers c
left join images i on i.foreignid=c.id
order by i.def desc limit 1
computers left join images
computers right join images
computers inner join images
computer outer join images
SELECT comp.id, comp.cond, comp.type, img.name, img.height, img.width FROM computers comp left join image img on img.foreignid = comp.id