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 PRO.id_format = FO.id_format' at line 4
SELECT PRO.id_grille, FO.type FROM c_profil AS PRO, c_format AS FO WHERE PRO.id_profil = AND PRO.id_format = FO.id_format