1
I have a table called lockers that record the locker number , name of the owner , and I have another table that record the entrance of students, but if someone who has closet missing for 10 days I need to warn, I can bring everyone who attended the period, how to find out who did not attend ?
SELECT idcad,data_presenca FROM armario
INNER JOIN presenca ON armario.idcad = presenca.id_cad
WHERE data_presenca BETWEEN CURRENT_DATE()-10 AND CURRENT_DATE()
It worked fine, but I still have doubts about how the code works, but it has helped me a lot and I search here more on the subject, Thank you very much !
– Leonardo Silveira
I edited the text , see there.
– Motta
Buddy, there was a problem, this code worked right until the life of the month, but now he’s not considering whether the staff was present last month, where the problem may be ?
– Leonardo Silveira
I don’t see why things should go wrong in the turn of the month. Here’s an example ?
– Motta