title: Mysql join order by
body: <p>I have two tables as follows:</p>
  
  <p>Table user_prefs:</p>
  
  <pre><code>user_prefs_id    int(11) PK
  user_id          int(11)
  item             varchar(128) PK
  category_id      smallint(6)
  parent           smallint(6)
  rank             tinyint(4)
  dateadded        datetime
  </code></pre>
  
  <p>Table categories:</p>
  
  <pre><code>category_id      int(11) PK
  name             varchar(255)
  main_category    varchar(64)
  parent           int(6)
  isparent         enum('No','Yes')
  display_rank     int(9)
  active           enum('Yes','No')
  </code></pre>
  
  <p>I am doing a select from <code>user_prefs</code> based on <code>user_id</code>, but I want to sort by category name which is in the categories table - <code>category_id</code> is matched between the two tables</p>
  
  <p>Is this possible?</p>