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 'order by news_id desc limit 8' at line 1select * from news_ar where news_type='0' and news_id!= order by news_id desc limit 8