• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.