A Database Error Occurred

Error Number: 1064

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 'AND P.news_category_id='4' order by SC.item_id DESC' at line 15

SELECT P.*,SC.*,PC.*, PC.news_category_name, SC.slug, SC.meta_title, SC.meta_description, SC.meta_keywords FROM `news` P LEFT JOIN (SELECT id categoryid, news_category_name FROM `news_category`) PC ON P.news_category_id = PC.categoryid LEFT JOIN `seo_contents` SC ON P.id = SC.item_id WHERE status='Y' AND SC.page_identifier='news' order by SC.item_id DESC AND P.news_category_id='4' order by SC.item_id DESC

Filename: models/News_model.php

Line Number: 1013