[MySQL] Top Online
#8

Store their online time in seconds only. Get rid of the hours and minutes. The maximum value the field can store would be 2147483647 seconds, which is about the equivalent of 68 years. That way you only need to store and sort one field and you can easily convert back to hours and minutes.

As for the short term solution, what Extremo posted should work. Each column in the 'order by' clause needs to have the sort order specified, otherwise it will default to ascending order.
Reply


Messages In This Thread
[MySQL] Top Online - by ReD_HunTeR - 22.02.2015, 05:48
Re: [MySQL] Top Online - by Naresh - 22.02.2015, 05:51
Re: [MySQL] Top Online - by CalvinC - 22.02.2015, 06:10
Re: [MySQL] Top Online - by JeaSon - 22.02.2015, 07:43
Re: [MySQL] Top Online - by ReD_HunTeR - 22.02.2015, 07:52
Re: [MySQL] Top Online - by Extremo - 22.02.2015, 08:00
Re: [MySQL] Top Online - by JeaSon - 22.02.2015, 09:15
Re: [MySQL] Top Online - by Vince - 22.02.2015, 09:50
Re: [MySQL] Top Online - by Extremo - 22.02.2015, 09:52

Forum Jump:


Users browsing this thread: 2 Guest(s)