海刚!
我非常接近于找出一份报告,我可以临时运行以查找我们所有未注册课程的用户。我确实有一份针对尚未完成课程的已注册人员的报告,但是此搜索未找到甚至未注册的给定学生。
当前代码是
SELECT u.lastname, u.firstname , u.email , c.fullname,
DATE_FORMAT(FROM_UNIXTIME(cc.timecompleted),'%m/%d/%Y %T') AS 'Completed'
FROM
prefix_role_assignments AS ra
JOIN prefix_context AS context ON context.id = ra.contextid
AND
context.contextlevel = 50 JOIN prefix_course AS c ON c.id = context.instanceid
AND
c.fullname LIKE "SAMPLE_COURSE_NAME"
JOIN prefix_user AS u ON u.id = ra.userid
JOIN prefix_course_completions AS cc ON cc.course = c.id
AND cc.userid = u.id
ORDER BY
cc.timecompleted,
u.lastname,
u.firstname
有什么想法吗??