I have two MySQL tables - student and groupmember. Both tables have the field sid.
I want to create a query that will select from the student table if the value doesn't exist in the groupmember table.
There is also a groupmember.grpid field which I will need to match on.
Some pseudo code would look like this:
SELECT ALL STUDENTS WHERE NO RECORD IN groupmember HAS VALUES groupmember.sid=1 AND groupmember.grpid=2
obviously the student.sid and groupmember.sid will need to be joined to ensure only those not in the groupmember table exist.