Contribute
EN / USD
Log in / Join
32
of 76
TEP , The Engineering Projects , Image

syedzainnasir

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon
MySQL LEFT JOIN not bringing correct result
TEP , The Engineering Projects , Calender Question: 09-Mar-2017
TEP , The Engineering Projects , Category In: Computer Software Projects
I have a school report card management system, that allows teachers to add marks into the database.

But for the teacher to be able to insert marks into the database he/she needs to login and when He/she logs into the system he/she will find a list of students he/she teaches and the subjects he/she is teaching and the subjects he/she is teaching to those students.

I have this MySQL query, that retrieves the records from the database. Here is the problem; Teacher A who teaches subject X logs in and inserts marks for student Z, and after inserting the marks then logs out.Then Teacher B who teaches subject Y logs into the system, teacher B will find marks inserted by Teacher A on Subject Y even though, teacher B has not yet entered the marks.

Here is the MySQL code; [code] SELECT marks.test_1, students.id, students.student_id, students.student_name, subjects.subject_name, forms.form_name, teacherxsubject.form_id, students.class, teacherxsubject.subject_id, teacherxsubject.teacher_id FROM `students` LEFT JOIN teacherxsubject ON students.class = teacherxsubject.form_id LEFT JOIN marks ON students.student_id = marks.student_id LEFT JOIN subjects ON subjects.subject_id = teacherxsubject.subject_id LEFT JOIN forms ON forms.form_id = teacherxsubject.form_id WHERE teacherxsubject.teacher_id=192[/code]
TEP , The Engineering Projects , Icon Answer: 0 TEP , The Engineering Projects , Icon Views: 150 TEP , The Engineering Projects , Icon Followers: 85
Small Bio
TEP , The Engineering Projects , Tags
PLC
Robot
STM32
Arduino
AI
ESP32
Ladder Logic
PLC Projects
Programming
Communicates STM32
PLC Projects
Communicates PLC
Font Style
Alignment
Indenting and Lists
Insert Media
Insert Items

Want to leave an answer!

Word Count :0 Draft Saved at 12:42 am.