Jan: Denksportaufgabe für MySQL-Gurus :-)

Beitrag lesen

Hi,
der LEFT JOIN ist dein Freund:
SELECT COUNT(c.LinkID), l.* AS komm_count
FROM links AS l
LEFT JOIN kommentare AS c
ON l.LinkID = c.linkID
WHERE l.CatID = 45
GROUP BY l.linkID

^ohne garantie ;)

Jan
--