KO:
		SELECT PD.marchio_web
		FROM prodotto_dati_quantita_web AS PD
		WHERE 
			PD.marchio = 'ALESSANDRO DELL'ACQUA'
			AND PD.marchio != 'TRU TRUSSARDI'
		GROUP BY PD.marchio_web
		LIMIT 1

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 'ACQUA' AND PD.marchio != 'TRU TRUSSARDI' GROUP BY PD.marchio_web LIMIT' at line 4