Changeset 8333 for trunk/bp-members/bp-members-functions.php
- Timestamp:
- 04/30/2014 07:22:59 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-functions.php
r8324 r8333 1037 1037 $bp = buddypress(); 1038 1038 1039 // The "NOT IN" clause prevents duplicates 1039 // Wipe out existing last_activity data in the activity table - 1040 // this helps to prevent duplicates when pulling from the usermeta 1041 // table 1042 $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->members->table_name_last_activity} WHERE component = %s AND type = 'last_activity'", $bp->members->id ) ); 1043 1040 1044 $sql = "INSERT INTO {$bp->members->table_name_last_activity} (`user_id`, `component`, `type`, `action`, `content`, `primary_link`, `item_id`, `date_recorded` ) ( 1041 1045 SELECT user_id, '{$bp->members->id}' as component, 'last_activity' as type, '' as action, '' as content, '' as primary_link, 0 as item_id, meta_value AS date_recorded … … 1043 1047 WHERE 1044 1048 meta_key = 'last_activity' 1045 AND1046 user_id NOT IN (1047 SELECT user_id1048 FROM {$bp->members->table_name_last_activity}1049 WHERE component = '{$bp->members->id}' AND type = 'last_activity'1050 )1051 1049 );"; 1052 1050
Note: See TracChangeset
for help on using the changeset viewer.