Use proper prefix in query. Fixes user queries ordered by post count. Props ziofix, ericmann. fixes #17123 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@17634 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-04-13 17:02:08 +00:00
parent ac0c1a2a77
commit cf2f1ad547
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ class WP_User_Query {
$where = get_posts_by_author_sql('post');
$this->query_from .= " LEFT OUTER JOIN (
SELECT post_author, COUNT(*) as post_count
FROM wp_posts
FROM $wpdb->posts
$where
GROUP BY post_author
) p ON ({$wpdb->users}.ID = p.post_author)