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 '.law-in-books, I mean AND t_libros.lc_publicar_en_web='si' ORDER BY lc_titulo AS' at line 1