ohdang888 Posted June 9, 2010 Share Posted June 9, 2010 I have this query: SELECT COUNT(impression_id) AS total FROM impressions WHERE widget_id='$widget_id' GROUP BY YEAR(datetime), MONTH(datetime), DAY(datetime) What i am trying to do is get a COUNT of impression from each individual 24 hour day. so.. for this table i have 2 dates right now (they are in datetime format) lets say 2010-05-06 and 2010-05-07... i want the count for each day... right now... all its returning in total = 1 ... but i have 2 dates with about 5 impressions each in them Link to comment https://forums.phpfreaks.com/topic/204335-mysql-group-by-the-particular-day/ Share on other sites More sharing options...
fenway Posted June 10, 2010 Share Posted June 10, 2010 I don't follow... what was wrong with DATE(datetime)? Link to comment https://forums.phpfreaks.com/topic/204335-mysql-group-by-the-particular-day/#findComment-1070146 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.