Schnix Posted January 10, 2008 Share Posted January 10, 2008 I have two tables. One with a list of questions, and one where I have put the users, and the id of the question. every time they answer a question correctly, it should appear in this table. as a username and question id. The connection/table is: table one: question id - subject id table to: question id - subject id - username I want to check if the user has answered the question - that is: there is an entry in the second table What I need to do is: If the user is logged in, and he wants to see a list over all questions he has not answered, the following need to be done: compare the question id and subject id where the username is matching. If the question id and subject id is matching in the two tables, then show table one, EXCLUDING the matching data from table two. How can I do this? - Schnix Link to comment https://forums.phpfreaks.com/topic/85339-i-need-query-help-with-a-query/ Share on other sites More sharing options...
fenway Posted January 10, 2008 Share Posted January 10, 2008 Sounds like a LEFT JOIN...IS NULL. Link to comment https://forums.phpfreaks.com/topic/85339-i-need-query-help-with-a-query/#findComment-435583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.