title: Ordering by a field, only if it exists
body: <p>I'm trying to get all users, and order them by a field on another table, however this field doesn't always exist?</p>
  
  <p>Users - Holds Users
  User Meta - Holds metadata, specifically "weight" which is what I'm trying to order by.</p>
  
  <p>A more concrete solution would be to automatically define them a default weight, however is there anyway I can make it work without? Current working query:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT * FROM users u, usermeta um 
  WHERE u.ID = um.ID 
    AND u.name LIKE '%search_terms%';
  </code></pre>
  
  <p>Lost on the order by part, any/all help would be appreciated!</p>