![]() |
Calculate Member Average Age?
I think this would be a fun hack for a simple stat.
Anybody know how? |
well first you would have to query the database for all users with a birthday. then convert the xx/xx/xxxx to a unix timestamp then divide that by the number of seconds in a year and then add the year to variable. once all the ages are added to a variable then divide the variable by the number of users found having a birthday;)
|
Oh geeeese. How about someone just convert this hack:
https://vborg.vbsupport.ru/showthrea...ight=User+Ages It's only 1 file :) |
[sql]SELECT AVG( YEAR( CURDATE( ) ) - YEAR( birthday_search ) ) - ( RIGHT( CURDATE( ) , 5 ) < RIGHT( birthday_search, 5 ) ) AS avgage
FROM user WHERE birthday_search NOT LIKE '0000-%'[/sql] |
Quote:
That would be great! Can anyone do it? :S |
Quote:
Read Kirby's post above yours, he already did it more then 10 days ago! |
w00t mines 22 lol
|
ah cool... 25 for me.
|
I don't think Andreas converted the mod. He just gave the query to get the average age. Anyone willing to convert the mod?
|
Mine's 32.0978 :)
|
All times are GMT. The time now is 08:40 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|