I have table containing data with news details, first i want to take latest 10 news with priority order basis. Here, I
have written sql statement (in postgres) something like,
SELECT news_id, news_title, news_url, news_position, news_order, news_status FROM "tblNews" ORDER BY news_id DESC, news_order ASC LIMIT 10 OFFSET 0
But this sql does not give the correct results as it takes only latest 10 records but it is not in the priority basis also.
How do i handle this in php atleast getting the latest 10 records and get the priority order basis
I have something in my mind to implement this, but i am looking for the best way ...