My code is here SQL query:
$sql = "select * from products where status='1' AND country='5' AND product_price > "50" AND product_price <= "100" order by product_id desc"; $product = $this->db->query($sql)->result_array(); It returns all products by using customs SQL but still not showing order by desc.