SELECT T.*,L.teacher_id FROM (SELECT * FROM `t_teacher_language_table` WHERE language_id in (0,37,38,39,40,41,42,43,44,45,46,51,53,54,56,57,58,59,60,61,62,64,65,68,69,70,71,72,73,74,78,76,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,98,97,99,100,101)) AS L LEFT JOIN t_teacher_table AS T ON L.teacher_id=T.id WHERE T.status = 1