s_ainley87 Posted July 15, 2008 Share Posted July 15, 2008 Hello, I am trying to get some data from members table but can't for the life of me work it out, I need to find the number of new members that signup per day for the last 6 months, but I cannot for the life of me work out the select statement, I have got as far as, SELECT email, date, source FROM members WHERE............. the WHERE clause needs to select the number members that signed up everyday for the last 6 months so I presume it is something similar to WHERE date > than 6 months ago? the reason I get stuck is becuase the date is a timestamp and I cannot for the life of me cannot work out what the timestamp means or when it is measured from, I understand that it counts the number of seconds from a certain date, but what? Also is it possible to change the datestamp to a proper date format for the use in a CVS file? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/114810-mysql-php-and-timestamps/ Share on other sites More sharing options...
DeanWhitehouse Posted July 15, 2008 Share Posted July 15, 2008 im not sure how to do it , but u could pull the data then do the if statement to work out how old they are? Quote Link to comment https://forums.phpfreaks.com/topic/114810-mysql-php-and-timestamps/#findComment-590334 Share on other sites More sharing options...
DoddsAntS Posted July 15, 2008 Share Posted July 15, 2008 Hi, Have a look at the strtotime() function use this in the where clause of your query, and for formatting the date have a look at the date() function A Quote Link to comment https://forums.phpfreaks.com/topic/114810-mysql-php-and-timestamps/#findComment-590337 Share on other sites More sharing options...
s_ainley87 Posted July 15, 2008 Author Share Posted July 15, 2008 ok thanks, is there a way to straight in the console phpMyAdmin Quote Link to comment https://forums.phpfreaks.com/topic/114810-mysql-php-and-timestamps/#findComment-590340 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.