I am compairing two tables and on mysql it shows the once that are not matched as NULL. How would I go onto printing this on a php.
so the once that are matched should just print the value. and the once that are not matched should print the original value.
the table structure is
Question: Que_ID, Que_Question, Que_Choice1, Que_Choice2, Que_Choice3, Que_Choice4, Que_Answer1, Que_Answer2, Que_Answer3, Que_Answer4
Answer: Ans_ID, Ans_Answer1, Ans_Answer2, Ans_Answer3, Ans_Answer4, Que_ID, Use_ID
I am using LEFT join to compare these tables.
SELECT question.Que_ID, Que_Answer1, Que_Answer2, Que_Answer3, Que_Answer4, Ans_Answer1, Ans_Answer2, Ans_Answer3, Ans_Answer4
FROM question
LEFT JOIN answer ON question.Que_ID=answer.Que_ID AND question.Que_Answer1=answer.Ans_Answer1 AND answer.Use_ID=1