Welcome Guest, Not a member yet? Register   Sign In
how to generate queries based on date
#4

[eluser]mddd[/eluser]
Please excuse me, I forgot one line. The query should be
Code:
SELECT dateflag, COUNT(*) AS num_stats
FROM stat
WHERE MONTH(dateflag)=MONTH(NOW()) AND YEAR(dateflag)=YEAR(NOW())
GROUP BY dateflag


Messages In This Thread
how to generate queries based on date - by El Forum - 07-30-2010, 01:52 AM
how to generate queries based on date - by El Forum - 07-30-2010, 02:22 AM
how to generate queries based on date - by El Forum - 07-30-2010, 05:02 AM
how to generate queries based on date - by El Forum - 07-30-2010, 05:06 AM
how to generate queries based on date - by El Forum - 07-30-2010, 05:27 AM
how to generate queries based on date - by El Forum - 08-02-2010, 01:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB