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

manicato’s picture

Priority: Major » Critical

Does anybody know where this is coming from?

liam mcdermott’s picture

Priority: Critical » Normal

Sorry, this isn't critical. Unfortunately I don't have an answer to your question at the moment, but may do in a few days.

manicato’s picture

Status: Active » Fixed

http://drupal.org/node/1796882 This committed update solved my problem. :-)

lucasgladding’s picture

I was going to ask whether it did, but you beat me to it. Thanks for confirming the fix.

Lucas

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.