title: How to sort database values in descending order with CodeIgniter?
body: <p>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.</p>
  
  <pre><code>   function get_records(){      
      $this-&gt;db-&gt;from($this-&gt;tbl_contactus);
      $this-&gt;db-&gt;order_by("contactus_id", "asc");
      $query = $this-&gt;db-&gt;get();
      return $query-&gt;result();
  }
  </code></pre>
  
  <p>The error: 
  <img src="https://i.stack.imgur.com/sblzw.png" alt="enter image description here"></p>