Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/13/2009 12:13:56 AM (16 years ago)
Author:
apeatling
Message:

FIxes #308

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-classes.php

    r813 r840  
    167167            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    168168
    169         $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT count(user_id) FROM {$wpdb->base_prefix}usermeta um WHERE meta_key = 'total_friend_count' ORDER BY RAND() DESC" ) );
    170         $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT user_id FROM {$wpdb->base_prefix}usermeta um WHERE meta_key = 'total_friend_count' ORDER BY RAND(){$pag_sql}" ) );
     169        $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT count(user_id) FROM {$wpdb->base_prefix}usermeta um ORDER BY RAND() DESC" ) );
     170        $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT user_id FROM {$wpdb->base_prefix}usermeta um ORDER BY RAND(){$pag_sql}" ) );
    171171       
    172172        return array( 'users' => $paged_users, 'total' => $total_users );
Note: See TracChangeset for help on using the changeset viewer.