Looking up fields from multiple table MYSQL -


i trying show schedules student. map out:

studentprofile -studentid  registration -registrationid -studentid  registrationschedule -regscheduleid(is not primary key,, not unique,,can have lot of instances) -registrationdid -scheduleid  schedules -scheduleid 

i wanted show schedules of student. frustrated this. make happen?

it seems following should work, it's based on information provided (which isn't much) there no guarantees:

select s.* schedules s join registrationschedule rs on s.scheduleid=rs.scheduleid join registration r on rs.registrationid=r.registrationid join studentprofile p on r.studentid=p.studentid p.studentid=? 

you'd have pass value ? in clause in order schedule particular student.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -