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 '-4, 4' at line 1 - SELECT *, DATE_FORMAT(ultimaModificacao, '%d/%m/%Y %H:%i:%s') as ultimaModificacao2 FROM noticia WHERE excluido = '0' ORDER BY id DESC LIMIT -4, 4