Hi i am trying to do a query against the wordpress usermeta database to get all users that have a custom meta_name and value assigned. The custom name/value is a score (integer). I need to bring back the users with the highest score and limit the query to 5 results.
I have a working statement but it doest want to sort them properly.
$gather_top_users = "SELECT * FROM ".$wpdb->prefix."usermeta WHERE meta_key='points' ORDER BY meta_value DESC LIMIT 5 ";
Any ideas why this is not properly sorting them in the array?