Database Query Error
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY exercise_name' at line 8

SELECT exercise_name, exercise_path, course_category_path FROM cms_course_favourites f JOIN cms_course_exercise e ON f.exercise_id = e.exercise_id JOIN cms_course_category c ON c.course_category_id = e.course_category_id WHERE f.members_id = ORDER BY exercise_name