Kapcsolat -

SQL: 
		SELECT id, hely_id
			FROM ovisuli_uj_fogadoora f
		LEFT JOIN 
			(SELECT fog_id, COUNT(id) letszam 
			FROM ovisuli_uj_fogadoora_felosztas 
			WHERE statusz=1 AND datum>'2024-07-20'
			GROUP BY fog_id) ff
			ON ff.fog_id=f.id
		WHERE statusz=1 
		AND f.hely_id=
		AND 
			ff.letszam>0
HIBA: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND ff.letszam>0' at line 11]