mysql - Looking up for multiple results -
studentprofile -studentid registration -registrationid -studentid(foreign key studentprofile) registrationschedule -regscheduleid(is not primary key,, not unique,,can have lot of instances) -registrationdid(foreign key registration) -scheduleid schedules -scheduleid
please keep in mind there no regscheduleid in schedules table i'v tried inner joining them on result comes how can schedules of student
this information, student's profile, schedule details.
select t.studentid, s.scheduleid studentprofile t join registration r on t.studentid = r.studentid join registrationschedule rs on r.registrationid = rs.registrationdid join schedules s on rs.scheduleid = s.scheduleid
remove tables not need in query.
if want filter specific student, add where t.studentid = 1234
.
Comments
Post a Comment