I am currently using C# and Mysql (XAMPP). I have 3 tables as shown below:
tblILearnQuestion : IlearnQuestionId, Question
tblILearnAnswer : ILearnAnswerId, ILearnQuestionId, StudentId, dateSubmited
tblILearnMarks : ILearnMarkId, ILearnAnswerId, Comments, mark
I need a single query to get the following data : question, studentid , mark and comment
. I have tried this but it does not work:
SELECT * FROM tblIlearnQuestion
INNER JOIN tblilearnanswer ON
tblilearnquestion.ilearnquestionid = tblilearnanswer.ilearnquestionid
INNER JOIN ilearnmarks ON
tblilearnanswer.ilearnanswerid = tblilearnmarks.ilearnanswerid
It says some columns does not exist and I have checked, I did name the columns correctly as it is in my database.