stevekos07
Registered User.
- Local time
- Today, 15:20
- Joined
- Jul 26, 2015
- Messages
- 174
Hi all. I have a table that records user activities based on a public function that is called when logging in. The table shows a list of users who have logged in and logged out, but in some cases the user may have logged in and out several times in a day.
I am looking to generate a list of currently logged-in users. One way I thought of doing this is through a query that uses the MOD function to produce users with an odd number of the sum of values "Logon" and "LogOut" in the Activities field.
The logic is that any user that has logged in but not logged out will have a total of values in the Activities field that is odd, which should mean that they are still logged in.
I have not used the MOD function but I have read about it, but I am still a bit confused about how to write the code.
Any help would be appreciated.
I am looking to generate a list of currently logged-in users. One way I thought of doing this is through a query that uses the MOD function to produce users with an odd number of the sum of values "Logon" and "LogOut" in the Activities field.
The logic is that any user that has logged in but not logged out will have a total of values in the Activities field that is odd, which should mean that they are still logged in.
I have not used the MOD function but I have read about it, but I am still a bit confused about how to write the code.
Any help would be appreciated.