The following code works very well:
SELECT oxadmain.name , oxadmain.year , oxadmain.photoID , oxadmain.thumbs , stuattend.ID , stuattend.studid , min(stuattend.date) as fromdate , max(stuattend.date) as todate , stuattend.teacher, stuattend.subject , stuattend.attendance, Count(*) AS RowCount, SUM(if(stuattend.attendance = 'Absent', 1, 0)) AS absents
FROM stuattend INNER JOIN oxadmain ON stuattend.studid=oxadmain.stuid
GROUP BY studid
ORDER BY name ASC
However, the RowCount always counts from the earliest (min) date in the stuattend table to the latest (max) date in the stuattend table.
Is there any way to limit RowCount to the date range entered in the Search form?
Thank you for your attention