views:

45

answers:

2

dear all. i have a lot of data in my database. after that i have some MySQL code for counting data. i want to make them can count monthly.

how to make this code can count just in current month? its mean if now september, it was just counting on this month. and the data from the other month is ignored. whats MySQL code to make it so that it can complete the code in the page link?

A: 

where date < '09-30-2010' and date >= '09-01-2010'

Zak
A: 
WHERE MONTH(Inspection_datetime) = MONTH(CURRENT_DATE) 
AND YEAR(Inspection_datetime) = YEAR(CURRENT_DATE)
klox