I'm new to MySQL so please tell me if my question is missing information,
I have a query that works fine:
select au.email, sm.created, sm.grade, sm.max_grade
from auth_user au, courseware_studentmodule sm
where sm.student_id = au.id
and course_id = 'MyCourse'
and sm.module_type = 'problem';
But when I want to add another column from a different table:
select au.email, sm.created, sce.created , sm.grade, sm.max_grade
from auth_user au, courseware_studentmodule sm, student_courseenrollment sce
where sm.student_id = au.id and sm.student_id = sce.id
and course_id = 'MyCourse'
and sm.module_type = 'problem';
I get this error
ERROR 1052 (23000): Column 'course_id' in where clause is ambiguous
Anyone know why?
Thanks