SELECT * FROM galerie g LEFT JOIN galerietranslacje t ON g.Idg=t.Idg WHERE t.Jezyk=1 AND g.Nad=0 AND g.Status=1 AND g.Publiczna=1 GROUP BY g.Idg ORDER BY g.Kolejnosc Galerie