A Database Error Occurred

Error Number: 1064

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 post_id DESC limit 0,1' at line 1

select post_id from tbl_news_posts where mem_id != order by post_id DESC limit 0,1

Filename: models/General_model.php

Line Number: 171