Hi,
Would you mind to share what would be the appropriate mysql query to obtain unique login users on Moodle from 1st day of January 2018 to the current date?
Thanks!
SELECT u.id, u.lastlogin FROM mdl_user u WHERE u.deleted = 0 AND u.lastlogin >= UNIX_TIMESTAMP(TIMESTAMP('2018-01-01 00:00:00')) GROUP BY u.id ORDER BY u.lastlogin DESC
You are the man Darko! Thanks!
How about from 1st of January 2018 to 31st of January 2018 with unique login users? How does the mysql query looks like?
We are here to help a bit, not do your homework. Use common sense to figure this out.
If you're using a version of Moodle less than 2.6, then the very next thing you should do is to upgrade to a newer version of Moodle. Moodle 2.6 stopped receiving security fixes (let alone bug fixes) nearly 3 years ago and there are almost certainly known security problems with it now.