SELECT b.id, a.verid, MIN(a.optpreis) FROM $tab_veranstaltung b LEFT JOIN $tab_veropt a ON a.verid=b.id GROUP BY b.id HAVING a.verid='$ver[id]';