Sorting by Last Updated

Theme, template, layout, or image issues

Sorting by Last Updated

Postby Averen » Thu Jan 04, 2007 8:19 pm

When sorting by Last Updated on the main roster list, the rows do not get sorted in the right order, Jan 1st is higher than Jan 4th in descending mode.
User avatar
Averen
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 152
Joined: Thu Jul 20, 2006 5:18 am

Re: Sorting by Last Updated

Postby Sylphid » Sat Jan 13, 2007 9:36 pm

as far as i can tell this is due to the year not being included in the sorting however character profiler does grab it in its time stampso this should be an easy fix

ill take a look around and see what i find
ImageImage
User avatar
Sylphid
WR.net Apprentice
WR.net Apprentice
 
Posts: 20
Joined: Thu Jul 06, 2006 12:03 am
Location: Illinois

Re: Sorting by Last Updated

Postby Raskii » Fri Feb 09, 2007 10:37 am

The problem is twofold:

First: The builtin MySQL (or whatever DB you're using) sorting algorithm is being used, which makes it much harder to do any data manipulation to help things sort better (this is because your data's being sorted before you even get it!)

Second: The data - which is coming from roster_players.dateupdatedutc - is in a poor format for proper sorting (it's stored as "m/d/y H:i:s").

The best fix for this would be to change the format that roster_player.dateupdatedutc uses. Preferrably to something more sortable such as the UNIX Epoch ("U"). Doing this would allow you to continue using builtin DB sorting and eliminate one of the steps needed for reformatting the date later on.

Because the preferred fix would take more time than I have to get the sorting problem fixed, I'm working on a quick - and VERY dirty - method instead.

I'll post it here when I'm done.
Raskii
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Tue Feb 06, 2007 9:26 am


Return to Appearance

Who is online

Users browsing this forum: No registered users and 0 guests

cron