Announcement

Collapse
No announcement yet.

average age

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gary King
    replied
    Thanks

    Leave a comment:


  • Lats
    replied
    You can use this query...
    Code:
    SELECT format(year(now()) - avg(right(birthday, 4)) , 2) AS Avg_Age
    FROM user
    WHERE right(birthday, 4) > '0000'

    Leave a comment:


  • Gary King
    replied
    I would like this as well, thanks.

    Leave a comment:


  • -=Sniper=-
    started a topic average age

    average age

    I posted at vb.org but not had a reply yet so if anyone can help? please do!

    I want the average age for my members! this is the code I found at http://www.vbulletin.org/forum/show...ght=average+age for vb2 I think?

    PHP Code:
    // average age
    $result=$DB_site->query_first("SELECT YEAR(NOW())-AVG(YEAR(birthday)) AS avgage FROM user WHERE YEAR(birthday) <> 0");
    $age=$result['avgage']; 
    thanks for the help
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X