ERROR

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 activo = 'Y' ORDER BY notas.fecha DESC LIMIT 0 , 12' at line 7 SELECT notas_tags.*, notas.* FROM notas_tags INNER JOIN notas ON (notas_tags.id = notas.id) WHERE notas_tags.id_tag = AND activo = 'Y' ORDER BY notas.fecha DESC LIMIT 0 , 12