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 'and idLingua=1' at line 5 select * from eventi e, eventi_lingue el where e.id = el.idEvento and el.idEvento= and idLingua=1