title: How to sort data in descending order cakephp
body: <p>Hello i am new in cakephp i'm facing the issue of viewing data i have a user table  relation with  other tables and i'm viewing all data in same page but i did not know how to to show other table array data in descending order with same find user function .</p>
  
  <pre><code>public function fillprofile($id = null) {
      $id = $this-&gt;Auth-&gt;user('id');
  
      $data = $this-&gt;User-&gt;find('first', array('conditions' =&gt; array('User.' . $this-&gt;User-&gt;primaryKey =&gt; $id)));
       $this-&gt;set('data', $data);
  
  }
  </code></pre>
  
  <p>User table relation with Userdata table</p>
  
  <pre><code> [User] =&gt; Array
      (
          [id] =&gt; 2
          [username] =&gt; 
          [onboarding_user] =&gt; 0
          [email] =&gt; test@gmail.com
          [password] =&gt; 95e14332b6a34e6c4c5e196c497e855b0ceb95a5
          [uni_code] =&gt; 7L1H
          [fullname] =&gt; Alex sharma
          [profile_img] =&gt; img/profile/1504870214_e211498fca9dd372e0db69f23b31756e.png
          [description] =&gt; Developer 
          [updated_date_time] =&gt; 2017-09-08 08:21:31
  
          [created_date_time] =&gt; 2017-07-06 16:23:27
      )
  
  
  [Userdata] =&gt; Array
      (
          [0] =&gt; Array
              (
                  [id] =&gt; 13
                  [user_id] =&gt; 2
                  [position_title] =&gt; Developer
                  [company_name] =&gt; TEST 2
                  [created_date_time] =&gt; 2017-08-18 13:19:53
                  [updated_date_time] =&gt; 0000-00-00 00:00:00
  
              )
          [1] =&gt; Array
              (
                  [id] =&gt; 19
                  [user_id] =&gt; 2
                  [position_title] =&gt; Angular Js
                  [company_name] =&gt; TEST
                  [created_date_time] =&gt; 2017-09-08 16:31:48
                  [updated_date_time] =&gt; 0000-00-00 00:00:00
              )
      )
  </code></pre>