Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Presenting records in reverse date order
Old 03-24-2009, 02:46 PM Presenting records in reverse date order
Novice Talker

Posts: 9
Name: Simon Harvey
Trades: 0
Hi folks —

I'm collecting site visitors' comments using a form and bouncing selected fields from each record back into a table at the bottom of the page. I'm date-stamping each submission using NOW() into a date-time field, which is set to be the db index. All is hunky dory, except that I want to display the latest records at the top of the table, not the earliest. And left to its own devices, the db gives me the earliest at the top. Can anyone suggest a way of reversing the order?

Many thanks.
northernsky is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-24-2009, 02:48 PM Re: Presenting records in reverse date order
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
order by
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-24-2009, 02:49 PM Re: Presenting records in reverse date order
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
You can add DESC to the end of the sql statement used to select the table, if you also use ORDER BY, which will sort it in reverse order.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-24-2009, 03:14 PM Re: Presenting records in reverse date order
Novice Talker

Posts: 9
Name: Simon Harvey
Trades: 0
Many thanks to you both.
northernsky is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Presenting records in reverse date order
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19793 seconds with 12 queries