I'm working on a classes database with specific users. When a user checks off a class as complete, it is added to a "ClassUser" table with the specific classID as well as the userID that completed the class. Now what I want to do is show a list of classes that the user has NOT taken from the primary Classes table.
So far, I have this SQL statement.
This gives me a list of all classes found in the Classes table that are NOT in the ClassUser table. This is almost what I want, but now I want to add another condition so it only returns classes that userID=20 has not taken.
As of now this SQL statement returns the classes that all of the users haven't taken but I want to only see the classes that a specific user hasn't taken.
I've tried AND WHERE user_id=20 ,but I get no results from that.
Does anyone have any ideas?
http://imgur.com/2EA1.jpg
That is a picture of my current tables.
Once again, my goal is to display the list of classes that a specific user has not taken, where the table "ClassUser" represents the classes that a specific user has taken.
Bookmarks