PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
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 Back to top

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.
View user's profile Send private message Visit poster's website Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
scottr
PHP-Portal Project


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

PostPosted: Sat Jan 03, 2004 11:50 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Jan 03, 2004 11:58 am Reply with quote Back to top

date_format is a MySQL function and the % constants are unix notaion for the date formats. Just try it - it works Smile
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
scottr
PHP-Portal Project


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

PostPosted: Sat Jan 03, 2004 12:34 pm Reply with quote Back to top

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 user's profile Send private message Visit poster's website Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Jan 03, 2004 12:37 pm Reply with quote Back to top

There may be more code to tweak - As I said, user_id should work just as well.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum