Had anyone any idea how to query a vbulletin database to generate a report on the number of registrations per month/year to achive results like..
MM/YYYY Count
01/2001 : 10
02/2001 : 12
...
...
Thanks to those answers below.. My final version that works is as follows:
SELECT
COUNT(*) as 'Registrations',
YEAR(FROM_UNIXTIME(joindate)) as 'Year',
MONTH(FROM_UNIXTIME(joindate)) as 'Month'
FROM vbfuser
GROUP BY Year,Month
I am not familiar with vBulletin's database structure, but you should do something like this, assuming your user table has a date/datetime/timestamp
created_date
orreg_timestamp
column or something similiar, using MySQL's YEAR() and MONTH() functions.This will result in something similiar to this:
Edit: regarding Dave's comment: vBulletin's date seems to be stored in Unixtime format. In this case, simply wrapping the column with
FROM_UNIXTIME
will convert it to a readable MySQL date: