Ich habe es
SELECT a.p_code, `p_id`, `p_titel`
FROM projekte AS a
LEFT JOIN projektbilder AS b ON a.p_code = b.bild_refID
WHERE b.bild_refID IS NOT NULL GROUP by p_id
Ich habe es
SELECT a.p_code, `p_id`, `p_titel`
FROM projekte AS a
LEFT JOIN projektbilder AS b ON a.p_code = b.bild_refID
WHERE b.bild_refID IS NOT NULL GROUP by p_id