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 Locacion_FE= AND Activo_FE=1 AND Formacion_Evento.Valor_FE=Formacion_Evento_' at line 2