vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Calculate Member Average Age? (https://vborg.vbsupport.ru/showthread.php?t=74528)

rex_b 01-17-2005 04:17 PM

Calculate Member Average Age?
 
I think this would be a fun hack for a simple stat.

Anybody know how?

AN-net 01-17-2005 04:22 PM

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;)

rex_b 01-17-2005 04:28 PM

Oh geeeese. How about someone just convert this hack:
https://vborg.vbsupport.ru/showthrea...ight=User+Ages

It's only 1 file :)

Andreas 01-17-2005 04:44 PM

[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]

TCattitude 01-28-2005 07:39 PM

Quote:

Originally Posted by rex_b
Oh geeeese. How about someone just convert this hack:
https://vborg.vbsupport.ru/showthrea...ight=User+Ages

It's only 1 file :)

WOW
That would be great!

Can anyone do it? :S

Marco van Herwaarden 01-28-2005 08:48 PM

Quote:

Originally Posted by TCattitude
WOW
That would be great!

Can anyone do it? :S

Lol,

Read Kirby's post above yours, he already did it more then 10 days ago!

sabret00the 01-28-2005 08:52 PM

w00t mines 22 lol

tpearl5 06-27-2005 05:02 PM

ah cool... 25 for me.

agiacosa 09-10-2006 10:45 AM

I don't think Andreas converted the mod. He just gave the query to get the average age. Anyone willing to convert the mod?

IvyKeepMommy 05-16-2008 09:52 PM

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
  • Page Generation 0.01244 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete