I'm building a grade posting system for my high school using php and MySQL (well that is kind of understood but never hurts to be specific). One of the things that I need to do is be able to generate a list of student names who are not already in a particular class. I have the class id (c_id) passed to the page via GET varaible. But I am having a little trouble comming up with the proper where statements on the sql query so I get a list of all students that are not already in the class.
I hope that all makes sence if not just ask and I'll be more than glad to clerify.
Database tables are aranged like this:
student (Holds student information such as name and e-mail)
Relevant fields are:
-s_id (student id)
-s_name (student name)
class (holds infromation on the class)
Relevant fields are:
-c_id (class id)
comment (holds comments on students as well as keeping track of the students that are in a class)
Relevant fields are:
-comment_id (unique id for the comment)
-student (holds student id [student.s_id])
-class (holds class id [class.c_id])