Mirreo
New Member
- Mar 25, 2020
- 8
- 4
Hey guys, i need help with something. I tried implementing online_time to my ranking list on the Cosmic CMS.
I fetch the column table online_time from my users_settings table in my database and it's in seconds.
How do i convert the seconds to hh mm ss format?
This is the jquerybulder code rn, but how do i convert the outcome of this to hh mm ss?
I fetch the column table online_time from my users_settings table in my database and it's in seconds.
How do i convert the seconds to hh mm ss format?
PHP:
public static function getOnlineTime($limit = 10)
{
return QueryBuilder::table('users_settings')->select('user_id')->select('online_time')->select('online_time')->orderBy('online_time', 'desc')->limit($limit)->get();
}
This is the jquerybulder code rn, but how do i convert the outcome of this to hh mm ss?