select * from immobili i, localita l, tipi t where i.id_tipi=t.id_tipi and i.id_localita=l.id_localita and id_immobili=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 10