You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-10 ,10' at line 7
SELECT tb_news.*, tb_newstype.tb_newstype_img FROM tb_news INNER JOIN tb_newstype ON tb_news.tb_newstype_id = tb_newstype.tb_newstype_id where tb_news_status=1 and tb_news.school_id='12020036' order by tb_news_id DESC limit -10 ,10