A simple mysql command

Mr.Smith

Member
Can anyone help me with a simple mySQL command to grab 10 mod logs from the last 24 hrs from the xenforo DB?

I just need to do a basic script so that the mods can see the logs themselves (only number of actions they have performed).

thanks!
 
This should do it:

Code:
SELECT user.username AS moderatorName, COUNT(*) AS count
FROM xf_moderator_log AS modlog
LEFT JOIN xf_user AS user ON (user.user_id = modlog.user_id)
WHERE modlog.log_date > UNIX_TIMESTAMP() - 24*60*60
GROUP BY modlog.user_id;
 
Top Bottom