and1_hotsauce
Registered User.
- Local time
- Yesterday, 22:08
- Joined
- Aug 29, 2011
- Messages
- 17
Hi,
I have 3 tables(pictured below). When a student sends an sms I need to check the studentID and password and respond with his/her results.
So far, I have created an sql statement which checks the studentID and passwords and sends a reply with his first name and last name from tblStudentInfo
But this will select the FirstName and LastName from tblStudentInfo.
Is there to way to extract CourseName, Results and Grade in the one sql statement?
I have 3 tables(pictured below). When a student sends an sms I need to check the studentID and password and respond with his/her results.
So far, I have created an sql statement which checks the studentID and passwords and sends a reply with his first name and last name from tblStudentInfo
Code:
SELECT * FROM tblStudentInfo WHERE StudentID = & intStdNo & " AND Passwords =n ' " &txtPassword& " ' "
But this will select the FirstName and LastName from tblStudentInfo.
Is there to way to extract CourseName, Results and Grade in the one sql statement?
Code:
eg. SELECT results,grade,courseName FROM tblResults AND tblCourseInfo WHERE StudentID = '1111' AND Passwords = 'abc123'
note that studentID nor Passwords are contained in either tblResults and tblCourseInfo