Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- (SELECT
- COUNT(`c`.`ID`)
- FROM `wp_posts` `c`
- WHERE `c`.`post_author` = `a`.`ID`
- AND `c`.`post_type` = 'post'
- AND `c`.`post_status` = 'publish'
- ) AS `count`,
- `a`.*
- FROM `wp_users` `a`
- LEFT JOIN `wp_usermeta` `b` ON `a`.`ID` = `b`.`user_id`
- WHERE `b`.`meta_key` = 'wp_user_level'
- AND `b`.`meta_value` = 1 -- contributor
- ORDER BY `a`.`user_login`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement