title: Wordpress $wpdb->usermeta sort by meta_value
body: <p>I am trying to display all users based on a meta_key called "points" like this:</p>
  
  <pre><code>$wpdb-&gt;get_col($wpdb-&gt;prepare("
  SELECT user_id, meta_key = 'points', meta_value 
  FROM $wpdb-&gt;usermeta 
  ORDER BY meta_value DESC 
  LIMIT $limit OFFSET {$paginate-&gt;offset()}"));
  </code></pre>
  
  <p>The users are displayed properly, but the order is not working, meta_value is equal to a number from 1 to ∞. So, how should I get it to work? Thanks.</p>
  
  <p>PS: This is the output:</p>
  
  <pre><code>Array ( [0] =&gt; 1 [1] =&gt; 2 [2] =&gt; 4 ) 
  </code></pre>
  
  <p>So I believe is ordered by ID.</p>