Welcome Guest, Not a member yet? Register   Sign In
Am I blind? no result when order_by 'desc' on feed-view
#1

[eluser]Jan_1[/eluser]
the model:
Code:
class Feed_model extends Model
{
function Feed_model()  { parent::Model();  }
function getRecentPosts ()
  {
    $this->db->order_by('id', 'desc');
//    $this->db->where('status', '1');
    $this->db->limit(20);
    return $this->db->get('blog_entry');
  }
}

Im using derek allard's simple feed-example.
I don't get results when I try to order by id or anything else with 'desc'.
Without order_by, or an order_by without second (asc/desc) works fine.
sorry for my bad english - Any Help???
#2

[eluser]danmontgomery[/eluser]
Enable profiler to see the query being run:

Code:
$this->output->enable_profiler();




Theme © iAndrew 2016 - Forum software by © MyBB