mysql - ERROR 1052 (23000): Column 'course_id' in where clause is ambiguous -


i'm new mysql please tell me if question missing information,

i have query works fine:

select au.email, sm.created, sm.grade, sm.max_grade auth_user au, courseware_studentmodule sm sm.student_id = au.id , course_id = 'mycourse' , sm.module_type = 'problem'; 

but when want add column different table:

select au.email, sm.created, sce.created , sm.grade, sm.max_grade auth_user au, courseware_studentmodule sm,  student_courseenrollment sce sm.student_id = au.id , sm.student_id = sce.id , course_id = 'mycourse' , sm.module_type = 'problem'; 

i error

error 1052 (23000): column 'course_id' in clause ambiguous 

anyone know why?

thanks

this because column course_id present in more 2 tables.

write sm.course_id or sce.course_id , work.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -