Joined: Jan 21, 2003 Posts: 41 Location: Southern California
Posted:
Fri Jan 02, 2004 10:03 pm
in Members_List/index.php at line 165 in your nuke 7.0 download:
the case 'joined' statement should order by 'user_id' not 'user_regdate'
since user_regdate is just a character column, not a date column.
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sat Jan 03, 2004 1:00 am
While you are correct in your observation that the ordering is not working correctly [as released by FB, the author, not me ] because it is a varchar format and not a date format, the intention is to order the output by the 'joined' date. If you change it to user_id, then that contradicts the case "joined", which is supposed to represent the joined date. I think what should actually be done to preserve the original intent, is the following
Code:
ORDER BY date_format( user_regdate, '%b %d %Y' )
Using user_id (an auto-increment column) should work in most cases also, but it is a bit confusing when you look at the logic and see 'joined' and user_id instead of a date field . This, too, has a potential problem. FB has chosen to hard code the date format as $user_regdate = date("M d, Y"); in Your_Account/index.php. As long as he doesn't change it, the date_format function will work. So, I guess it's 6 of one 1/2 dozen of the other.
Joined: Jan 21, 2003 Posts: 41 Location: Southern California
Posted:
Sat Jan 03, 2004 11:50 am
yes i agree with you but i can't find the date_format() function anywhere
nor the %b, you mean %M ?
this fix has to change line 165 in Members_List/index.php.
obviously the best solution is if the user_regdate column was a date column
but FB didn't think of that
Joined: Jan 21, 2003 Posts: 41 Location: Southern California
Posted:
Sat Jan 03, 2004 12:34 pm
oh, a mysql function, no wonder i couldn't find it, i was looking in the code for it and php.net for it.
ok it works, oops, the descending order is not working though, i'm running mysql 3.23.52 and 3.23.51.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum