SELECT * FROM attendance
WHERE grade = '4'
and date = 2022-10-25
this is the query when I use date in it, it does not work.
The date I am getting is with php function in php
sql query in php look like this
SELECT *
FROM attendance
WHERE grade = '".$_POST['grade'][1]."'
and date = $date`
but if I also hard code date in the query it does not give any result but if I remove the date query works fine. the date type in database is date