select a.username ,b.schoolname,c.classname from user a
left out join schoolTable b on a.school =b.id
left out join classTable c on a.class=c.id
------解决方案--------------------
select a.id as '学员编号',a.username as '学生姓名',b.schoolname as '学校',c.classname as '班级' from user a left join school b on a.id = b.id left join class c on c.id = a.id