While doing a project for the school I work at I needed to do some IF type of statements in my mySQL Query. Things like if they are a HS student did they submit this form.
So for instance I would love to be able to check if multiple forms had been sent to the school based on a persons grade level and come back with all students missing some sort of form
SELECT studentId
FROM students
WHERE formBirthCertificate != 1 AND anotherForm != 1 and familyForm != 1
IF (gradeLevelId >= 9 then formHighSchool !=1)//they are High School student did they submit a form
IF (gradeLevelId >= 5 then formStudent !=1)
It is not an either or type or condition, it is more if the person is in high school (gradelevelId 9), check to see they also submitted this form.
Any help would be greatly appreciated