poe Posted May 8, 2008 Share Posted May 8, 2008 i have my dates stored in the db like in a field called fulldate: 1210118400 1210032000 1209945600 etc... how do i do a query to count number of records that are in apr, may, june etc... i have: $ttl_apr = $db->numRowsQ(" SELECT * FROM clicks WHERE date('M', fulldate) = 'April' "); $ttl_may = $db->numRowsQ(" SELECT * FROM clicks WHERE date('M', fulldate) = 'May' "); thanks Quote Link to comment Share on other sites More sharing options...
writer Posted May 8, 2008 Share Posted May 8, 2008 I'd like to do something similar. It sounds like there's a lot to it. Quote Link to comment Share on other sites More sharing options...
fenway Posted May 8, 2008 Share Posted May 8, 2008 Are those unix_timestamps? If so, there's a FROM_UNIXTIME() function that will give you a proper SQL date, and then you can check MONTHNAME(). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.