Trying to filter assignmnets on date

Trying to filter assignmnets on date

by Kieran Briggs -
Number of replies: 0
Hi,

I'm creating a new myMoodle page and I'm wanting to filter the assignments due to only show assignments which are in the future.

I've created this sql query but I have the date filter wrong and I'm not sure how to correct it.

SELECT DISTINCT mdl_assignment.id, mdl_assignment.name, mdl_assignment.timedue, mdl_course_modules.instance FROM mdl_assignment
left join mdl_course_modules on mdl_course_modules.instance = mdl_assignment.id
WHERE mdl_assignment.course=$assignmentcourseid AND mdl_assignment.timedue >= DATE(NOW())"

Can anyone help please?

Thanks

Kieran
Average of ratings: -