A couple of years back when Joomla first popped up and that i moved over from Mambo I recall getting a great little component known as Community Builder (CB) that stretches the consumer-based interface behind Joomla. During the last few years both Joomla and Community Builder have become and prospered.
I've found myself recalling a little module I discovered when first toying with CB that displayed a few helpful particulars about customers that I wish to have the ability to extract from the current project. These particulars incorporated:
- Total customers registered
- Total customers registered daily
- Total customers registered each week
- Total customers registered monthly
- Latest user registered
- Total site visitors towards the site
My real question is mainly concerning how to recreate something much the same. I have been attempting to construct an SQL statement that may manipulate the consumer table results and do a comparison to some set criteria eg. find all user's having a '
registerDate' variable in the last week.
The issue which has me lost is how you can manipulate and compare to start dating ? string that resembles '
Any help on either problem could be much appreciated.
The issue which has me lost is how you can manipulate and compare to start dating ? string that resembles '2008-08-05 07:41:40'
You could have MySQL turn this right into a UNIX timestamp, or run it through strtotime.
SELECT UNIX_TIMESTAMP(datetime_field) FROM table
$timestamp = strtotime('2008-08-05 07:41:40');