General developer forum

No Data found in prefix_log table

 
Picture of Tim Fang
No Data found in prefix_log table
 

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

 
Average of ratings: -
Davo
Re: No Data found in prefix_log table
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developers

If you're using any recent version of Moodle, then the mdl_log table is no longer used - by default logs are written to mld_logstore_standard_log instead (but you will have to look at the content of that table and adapt your report, as the table fields are not the same).


 
Average of ratings: -
Picture of Tim Fang
Re: No Data found in prefix_log table
 

i tried 

prefix_logstore_standard_log   it works but the variables are 


, are those same as log table ?


//


I am trying to figure out number of  log on each course, do you know any query on this? any hints?


Thank you so much!

 
Average of ratings: -