i have four tables (sclass, studentinfo,subject,stugra
de). i want to run a query to get data from these four tables. i have run the query to get the data, but the problem is i am only getting data where the tables have field in common. for example, students in (studentinfo table ) don't display if they don't have grade in (stugrade table). i want the students to display even if they don't have grade. i don't know how to apply the full outer join to accomplish this task.
please see what i have done.
$query="select s.student_id,s.fname,s.mname,s.lname,c.class_id,c.classname,c.sectionname,u.subject_id,u.subjectname,g.period,g.Acadamicyear,g.grade,g.approvedby,g.grade_id from studentinfo s,sclass c,subject u,stugrade g where g.student_id = s.student_id AND g.classid = c.class_id AND g.subject_id = u.subject_id";
$result = mysqli_query($mysqli, $query);
thanks for the help