I guess you can do with get_users, something like:
$topusers = get_users( array (
'meta_key' => 'todayuserclicks',
'meta_value' => '',
'meta_compare' => '!=',
'orderby' => 'meta_value',
'order' => 'DESC',
'number' => '10',
) );
Related Posts:
- LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?
- Search multiple meta keys at once
- Querying Email Addresses for a List of Users with Same Last Name?
- In what part of the WordPress core does the users table and usermeta table get joined?
- Modify Database in Multi-Site wp_usermeta table
- Get an array of meta_values for a user meta_key
- mysql query two database tables, users and usermeta and sort by custom meta int value
- WordPress SQL Issue not returning correct reselts
- get_results not returning anything
- Get emails from users by custom field SQL
- How to relate the Category to user?
- How to get image path from id using SQL
- Intermittent problem writing update_user_meta
- Checking if meta_value exists for any user
- user_login vs. user_nicename
- How to parse row results from $wpdb -> get_results
- $wpdb->insert not working in any way
- get_results on large datasets
- $wpdb->insert() and Values for Datetime Columns?
- Getting all user metadata from user
- Extending WP_User class and using this sub-class during the whole lifecycle
- Change post status based on meta value
- Show Biographical Info while creating new user
- Speed optimization of $wpdb->get_results
- $wpdb is get_results escaped
- Hide a user from WordPress
- $wpdb insert array
- get_user_meta Short Profile Section
- How to update records using $wpdb?
- Exclude subscriber users from user list
- Memory usage for scalable usermeta queries
- Select Multiple meta_value from WP DB; Single Query
- show badge with count for pending items in custom post type
- Get all user meta by meta key instead of ID
- wpdb->insert and stripslashes against sql injection
- create drop down menu in theme customizer from custom db
- Average Account Age
- Are there risks associated with using wp_options table using wpdb to update theme options
- WordPress User Meta & ChromePHP or other way to debug/view php variables
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- $wpdb->insert is running multiple times on page load, but only called once
- Force a user’s posts category
- $wpdb select query by month, post type, and taxonomy term
- Confused by $wpdb->prepare
- WordPress (on AWS ubuntu) database Fails “Connection refused in .. /wp-includes/wp-db.php on line 1531”
- How to display user_nicename and usermeta values by custom query in WordPress?
- Users create/join groups
- How to get entry by title by using wpdb
- How to list users by custom field?
- users and usermeta table
- $wpdb not being defined in function: Fatal error: Call to a member function query() on a non-object
- WordPress is trimming leading 0s
- Gather posts into a cart/lightbox and share with another user
- “the_author_meta(‘url’)” not working inside “href”
- How to left join meta in queries [closed]
- Save data from a checkbox to a wpdb array
- How to get user ID’s from multiple usernames?
- WP-PostRatings: list current user’s rated posts
- Get the users that my following users are following
- WPDB Join with custom table
- Getting values from wpdb
- Why is this $wpdb query looping 5 times?
- wpdb query not returning results containing single quotes
- duplicate entries in database while using save_post or wp_insert_post
- get_users with Serialized Custom Meta Value
- Unknown column ‘siteurl’ in ‘where clause’ WPDB outside
- Inserting a MySQL record into a table with an array of field names and an array of values
- Incorrect Use of wpdb::prepare()
- Ascending order of yearly archives [closed]
- WP_User_Query not searching
- Uses for function: wp_update_user
- how to list all post that are in the custom taxonomy using $wpdb
- Get UserInfo from WordPress
- Display current user metadata on WordPress page
- wpdb prepare placeholders for MySQL keywords
- Escaping a WPDB Object in One Shot
- show user based on user_meta
- REST_query_vars for users
- Create a stored procedure on plugin activation
- Get last element from wpdb as a string
- Extend WP_User_Query or WP_User to return all custom fields?
- Custom database query to validate data
- Update all fields of table with ON DUPLICATE KEY UPDATE command
- WordPress – wpdb query does not list same result as sql query
- What is the best practice to initialise $wpdb by loading wp-load.php?
- $wpdb->get_results in not an array
- How to make iteration on wpdb->update or query statement?
- User management missing after migration to new host
- Display and Allow users to edit their own profiles
- Validate user meta and redirect
- Let admin users edit member profiles from front end
- Jeditable Plugin working as it should – scope issue?
- Store subscription details for users in WordPress
- Site going down due to slow queries
- Call to a member function get_results() on a non-object in wordpress plugin
- How to add custom detail page for a Subscriber at Admin Panel
- How do I change the datetime format from ( ‘y-m-d’ ) to ( ‘d m y’ ) [closed]
- $wpdb The query does not contain the correct number of placeholders
- $wpdb:insert, more arguements in $format array than in $data
- Export user data from Squirrly’s Starbox plugin?