General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 27th, 2003, 03:33 PM
PhreakShow64 PhreakShow64 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 13 PhreakShow64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to PhreakShow64
Comparing Dates?? Methods of ordering posts?

I've created a forum... the only problem I've had so far is getting the posts to show up in order of the last post... An example of how my lost post is set up is 1:11:11 PM on 1/27/03 by PhreakShow64, now i was just ordering them by that but today i got the problem that 7 AM posts were being displayed before 4 PM posts, any ways you can think of to order it??

Reply With Quote
  #2  
Old January 27th, 2003, 03:50 PM
ramz ramz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Juiz de Fora - MG- Brazil
Posts: 93 ramz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to ramz Send a message via MSN to ramz
Try this...

Have you tried ordering it by the post id?!
ORDER BY post_id...

If this doesn't fix the problem, answer me and tell me if you're using date and time separated columns or if you're using a timestamp column? Are you using MySQL?
__________________
Regards,
Ramiro Varandas Jr.

Reply With Quote
  #3  
Old January 27th, 2003, 04:10 PM
PhreakShow64 PhreakShow64 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 13 PhreakShow64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to PhreakShow64
Oops sorry i didnt mean the posts i meant the threads! I already have the posts ordered by the post id but that wont work with Threads because they could be posted on long after they are made... The date and time are not separated its in one mysql field.. last_post and it contains date, time and poster

Reply With Quote
  #4  
Old January 27th, 2003, 04:18 PM
ramz ramz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Juiz de Fora - MG- Brazil
Posts: 93 ramz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to ramz Send a message via MSN to ramz
You can use this:

SELECT * FROM table WHERE ... ORDER BY (timestamp_field <= NOW());

Reply With Quote
  #5  
Old January 27th, 2003, 04:40 PM
PhreakShow64 PhreakShow64 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 13 PhreakShow64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to PhreakShow64
Didn't help, it just spread things all over the place

Reply With Quote
  #6  
Old January 27th, 2003, 06:36 PM
Jeb. Jeb. is offline
"l33t? What's l33t?"
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 Jeb. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via AIM to Jeb.
You could try giving your threads a "last activity" column which holds the timestamp of the last date when someone posted in it - then simply order by that column. Recently posted ones come first, others come last.
__________________
Jeb.

AIM: JebediahMc - PM Me - E-Mail Me


Last edited by Jeb. : January 27th, 2003 at 06:40 PM.

Reply With Quote
  #7  
Old January 27th, 2003, 08:51 PM
ramz ramz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Juiz de Fora - MG- Brazil
Posts: 93 ramz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to ramz Send a message via MSN to ramz
Yeah...

Yeah... I would take Jeb's advice... it seens to be the easiest and simple solution.

Reply With Quote
  #8  
Old January 28th, 2003, 03:24 PM
PhreakShow64 PhreakShow64 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 13 PhreakShow64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to PhreakShow64
Thanx

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Comparing Dates?? Methods of ordering posts?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway