Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
05-05-2014, 10:54 AM #1
- Join Date
- Mar 2010
- Thanked 5 Times in 5 Posts
Compare unix time field with month / year
I need some help with a query to count posts made in a certain year and month.
I was thinking of something like
SELECT COUNT(*) FROM post_table WHERE time_field > ... AND time_field < ...
It's formated like Year Month so this would be 2012 April.
So I was kind of wondering how can I get this to work.
I'm trying to the count how maney posts where made in the year 2012 in the month April.
I can convert the string year and date by php using strtotime('201204' . '01');