At the moment I have a MYSQL query that looks like this…
SELECT distinct devid,username FROM auth_log WHERE MONTH(accesstime) = 1;
This would return all of January which is what I want. Is it possible to return an array or something like that as a single query for a whole year or date range but split by month thus saving me from having to run multiple queries like.
SELECT distinct devid,username FROM auth_log WHERE MONTH(accesstime) = 1;
SELECT distinct devid,username FROM auth_log WHERE MONTH(accesstime) = 2;
SELECT distinct devid,username FROM auth_log WHERE MONTH(accesstime) = 3;
How about just get
and do your filtering work in the front end?