I need a code to pull in the times online of every member on the site and input it as one number. Such as "Our Members In Total Have Been Online For 33d 9h 3m". Can anyone make this code for me?
Still Looking For This, A Year Later
Its probably possible to write a query.
But I wouldnt put it on EVERY forum page, because it will be a heavy mysql query.
The query on the database would be
select sum(totalTimeLoggedIn)
from `{db_prefix}members`
However I'm not sure how to turn that into x months, x days, x hours, x mins in php
dividing it by 60*60 should turn it into hours (but as a decimal)
So how would I go about getting it to right it as days, hours, minutes? Any clue, i'm not that good with mysql.