Hello everyone!
I am trying to SELECT studentID where schoolID=1, and date1 is between $schoolStartDate and $schoolEndDate, or date2 is between $schoolStartDate and $schoolEndDate OR where status==yes.
I can't seem to get it right. I've tried so many ways. Here's what I have now.
$sql="SELECT studentID
FROM status
WHERE schoolID=$schoolID
AND ((startDate Between $startSchoolYear And $endSchoolYear) ) OR ((endDate) Between $startSchoolYear And $endSchoolYear))OR ((status==yes))";
That doesn't give me the right results. If anyone can help it would be greatly appreciated. Thank you.