I have a views which shows a list of members and their online/offline status.
The problem: Even with DISTINCT activated, I get two entries per member, one online and one offline.
When I remove the online/offline field everything is OK. So the problem is the user_stats module.
Here is the query of the view:
SELECT DISTINCT users.uid AS uid, users.name AS users_name, flag_friend.uid AS flag_friend_uid, 'user' AS field_data_field_pictures_user_entity_type, 'user' AS field_data_field_date_de_naissance2_user_entity_type, IF((1361534147 - IFNULL(sessions.timestamp, 0)) < 900, 1, 0) AS users_is_online
FROM
{users} users
LEFT JOIN {flag_friend} flag_friend ON users.uid = flag_friend.uid
LEFT JOIN {sessions} sessions ON users.uid = sessions.uid
WHERE (( (users.uid IN ('6', '68')) )AND(( (users.status <> '0') )))
LIMIT 10 OFFSET 0
Comments
Comment #1
manicato commentedDoes anybody know where this is coming from?
Comment #2
liam mcdermott commentedSorry, this isn't critical. Unfortunately I don't have an answer to your question at the moment, but may do in a few days.
Comment #3
manicato commentedhttp://drupal.org/node/1796882 This committed update solved my problem. :-)
Comment #4
lucasgladding commentedI was going to ask whether it did, but you beat me to it. Thanks for confirming the fix.
Lucas