Changeset 840 for trunk/bp-core/bp-core-classes.php
- Timestamp:
- 01/13/2009 12:13:56 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r813 r840 167 167 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 168 168 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}" ) ); 171 171 172 172 return array( 'users' => $paged_users, 'total' => $total_users );
Note: See TracChangeset
for help on using the changeset viewer.