I am bit new to CI.I want to sort my database values in descending order using this query below in my model. However, it doesn't work form me and throw errors .please help me out.
function get_records(){
$this->db->from($this->tbl_contactus);
$this->db->order_by("contactus_id", "asc");
$query = $this->db->get();
return $query->result();
}
The error:

$this->tbl_contactusis empty according to error$this->db->select('*')before from function's line it is the correct format to write query with active record