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 m2.livello != 2 and m2.utente = 0 and m2.visibile = 1 union SELECT m2.id_men' at line 1