Reply to topic
SQL help...
Ennio


Joined: 17 Nov 2006
Posts: 101
Location: Scotch Plains, NJ
Reply with quote
I need to get all the values from table A that is not in Table B for a specific user and category.

I have this so far, but I only get the results if the user has already completed at least one question. So if a new user did not complete any question I get nothing. And I would like to display all the questions

Code:

SELECT * 
FROM   tbl_question
LEFT OUTER JOIN tbl_answered_questions
ON tbl_question.qid <> tbl_answered_questions.qid
WHERE tbl_question.catid = 2
AND tbl_answered_questions.uid = 2

Very Happy Cool
SQL help...
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic