Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
scottr
PHP-Portal Project


Joined: Jan 21, 2003
Posts: 41
Location: Southern California

PostPosted: Fri Jan 02, 2004 10:03 pm Reply with quote

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.

_________________
DECEASED Sad 
View user's profile Send private message Visit poster's website Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Sat Jan 03, 2004 1:00 am Reply with quote

While you are correct in your observation that the ordering is not working correctly [as released by FB, the author, not me Smile] 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 Smile. 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.
 
View user's profile Send private message
scottr
PostPosted: Sat Jan 03, 2004 11:50 am Reply with quote

yes i agree with you but i can't find the date_format() function anywhere Sad
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
Rolling Eyes
 
Raven
PostPosted: Sat Jan 03, 2004 11:58 am Reply with quote

date_format is a MySQL function and the % constants are unix notaion for the date formats. Just try it - it works Smile
 
scottr
PostPosted: Sat Jan 03, 2004 12:34 pm Reply with quote

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.
 
Raven
PostPosted: Sat Jan 03, 2004 12:37 pm Reply with quote

There may be more code to tweak - As I said, user_id should work just as well.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©