[eluser]Tom Schlick[/eluser]
[quote author="yousuf_007sys" date="1248167316"]I need to arrange my records in the order of my id & i can't figure out how to do it using active record. please help me out
Code:
$q = $this->db->get_where('mydiary', array('username' => $username))->orderby('id');
Any help will be highly appreciated[/quote]
Code:
$this->db->order_by('id');
$this->db->where(array('username' => $username));
$q = $this->db->get('mydiary');
ive always done it the long way. it has never failed.