Changeset 1252
- Timestamp:
- 03/25/2009 06:01:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r1245 r1252 216 216 like_escape($search_terms); 217 217 218 $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(u.ID) as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE ' %%$search_terms%%' ORDER BY pd.value ASC" ) );219 $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE ' %%$search_terms%%' ORDER BY pd.value ASC{$pag_sql}" ) );218 $total_users = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT count(u.ID) as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE '$search_terms%%' ORDER BY pd.value ASC" ) ); 219 $paged_users = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM {$wpdb->base_prefix}users u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.value LIKE '$search_terms%%' ORDER BY pd.value ASC{$pag_sql}" ) ); 220 220 221 221 return array( 'users' => $paged_users, 'total' => $total_users );
Note: See TracChangeset
for help on using the changeset viewer.