|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Date Function
I want to be able to calculate how many days, months, and possible weeks it has been from a specific date entered in a MySQL database.
I am trying to calculate how many logins i get from my members per day, week and month. Everytime someone logs in it gets recorded in my database but how do i calculate the average logins per day/week and month? My email is neilconlan@hotmail.com Thanks Neil |
|
#2
|
|||
|
|||
|
RE: Date Function
use the combination date(mktime())
|
|
#3
|
|||
|
|||
|
RE: Date Function
Did you try SQL functions ?
I'm not sure, but you may try sthg like SELECT COUNT(*) FROM myTBL GROUP BY MONTH(myDateField) Here's the mySQL date/funcs help page: http://www.mysql.com/doc/D/a/Date_a..._functions.html |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Date Function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|