Hi
I was trying to do the following query but it does not have any record on table prefix_log,
and then i tried 'select * from prefix_log' and there is nothing on prefix_log, does anyone know what is it happen like that? how can I fix it? the system should record logs somewhere...
//
Total activity per course, per unique user on the last 24h
SELECT
COUNT(DISTINCT userid) AS countUsers
, COUNT(course) AS countVisits
, concat('<a target="_new" href="%%WWWROOT%%/course/view.php?id=',c.id,'">',c.fullname,'</a>') AS Course
FROM prefix_log AS l
JOIN prefix_course AS c ON c.id = l.course
WHERE course > 0 AND FROM_UNIXTIME(TIME) >= DATE_SUB(NOW(), INTERVAL 1 DAY) AND c.fullname LIKE '%תשעג%'
GROUP BY course
ORDER BY countVisits DESC