monkeytooth Posted January 14, 2009 Share Posted January 14, 2009 Ok, alright, I don't know where to begin with this, so... I have a database in it is a table with one particular column. This column contains Timestamps more specifically the generic ones "time();" I dunno I didn't build it that way but I have to work with it that way, to much to data already stored convert over to something else. So I know how to take the timestamp and convert it to something readable and for the most part I can use them to do any calculations I need. However my employer has come up with a notion to break everything down by month/year. That said I need to query the DB for everything, take that columns worth of date figure out the month/year and then break it down into counts. My issue with this is as mentioned above, no clue where to begin. So i am looking for any and all help, im not looking for someone to code something for me, but if you can help me figure out some coding that can work id love to go back and forth with ya about it.. So thank you in advance.. Any suggestions, ideas, etc.. welcome too. Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 14, 2009 Share Posted January 14, 2009 you could use mktime to generate a timestamp for that month/year and then use mktime again to generate the END of that month in conjunction with date then do WHERE `timestamp` > '{$startDay}' AND `timestamp` < '{$endDay}' 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.