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 'WHERE BLOG.TITULO Like 'q%' ORDER BY BLOG.FECHA DESC LIMIT 0,21' at line 1SELECT BLOG.TITULO, FECHA, BLOG.ID, USUARIOSTRUCOTECA.LOGIN, USUARIOSTRUCOTECA.IDUSUARIO FROM BLOG inner JOIN USUARIOSTRUCOTECA ON BLOG.IDUSUARIO = USUARIOSTRUCOTECA.IDUSUARIO where REPLY_TO=0 WHERE BLOG.TITULO Like 'q%' ORDER BY BLOG.FECHA DESC LIMIT 0,21