I'm having some trouble figuring this one out. I have a database which contains a listing of employee names along with the results of completed exams they have done. So each record contains their name and the name of the exam they have completed.
What I'm trying to do is pull out how many exams each employee has done, and then email myself a message when all 15 exams have been completed.
I have tried grouping like this:
$sql = "SELECT employee, COUNT(employee) FROM examsData GROUP BY employee where employee = '$employee'";
and then counting the rows, but I'm not sure if I'm on the right track. Any ideas would be greatly appreciated.