At the moment I have something like this...
SELECT SUM(a.PaidSingle) AS PaidSingle,
DATE_FORMAT(a.TimeIn, '%a') AS weekDay
FROM Attendance AS a JOIN MemberDetail AS m ON m.id = a.MemberID
WHERE m.CardNumber = '$cardNo'
AND WEEK(a.TimeIn, 0) = WEEK(NOW(),0)
GROUP BY weekDay
ORDER BY a.TimeIn
But it dawned on me after writing it that this will take things from previous years as well as the current year.
I wanted to simply then say and year = thisYear but of course then on a week starting in December and ending in January I will only get half a week.
What is the best way to do this in MySQL or should I use a PHP based solution?