Sacerdoti in diocesi

Invalid query: 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 s.cognome<>'' AND s.invisibile = 0 GROUP BY s.idSacerdote ORDER BY s.cognome' at line 7 Whole query: SELECT s.idSacerdote as sacid,s.cognome as saccognome,s.titolo as sactitolo,s.nome as sacnome,s.ordine as sacordine,s.diacono as diacono,c.categoria as saccategoria,s.conspresb as conspresb,DATE_FORMAT(s.dataOrdinamento, '%d/%m/%Y') as sacorddata,s.luogoOrdinamento as sacordluogo, DATE_FORMAT(s.dataOrdinamento2, '%d/%m/%Y') as sacorddata2,s.luogoOrdinamento2 as sacordluogo2, s.indirizzoPersonale as sacindirizzo FROM sacerdoti as s LEFT JOIN categoria as c ON c.idCategoria=s.categoriaId WHERE s.idSacerdote<>395 AND s.categoriaId=1 AND s.idSacerdote=366/ AND s.cognome<>'' AND s.invisibile = 0 GROUP BY s.idSacerdote ORDER BY s.cognome ASC