SELECT *
FROM question
LEFT JOIN answer ON question.Que_ID=answer.Que_ID
AND question.Que_Answer1=answer.Ans_Answer1
AND question.Que_Answer2=answer.Ans_Answer2
AND question.Que_Answer3=answer.Ans_Answer3
AND question.Que_Answer4=answer.Ans_Answer4
AND question.Tes_ID=7
AND answer.Use_ID=1
This should only show record that are use_ID=1 and Tes_ID =7. But in MySQL, there are data for test ID=8 and etc. isnt it only suppose to be 7.