SunQuest
           MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 27th, 1999, 03:40 PM
Andrew T
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
First off, I am using PHP for the script. Here is a MySQL command that I am using it:

SELECT id, day, title, publisher, developer FROM previews ORDER BY id

With that command it orders the id like this:
1
2
3

However, I want it to order it like this:
3
2
1

Do you have any idea of how to do that? I tried rsort() but either it
didn't work or I was using it wrong.

Thanks,
Andrew

Reply With Quote
  #2  
Old November 29th, 1999, 07:47 AM
rod k
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
rsort() is a PHP function and can't be used inside the SQL statment. Fortunately, there is a simple solution. Rewrite your query to this:

SELECT id, day, title, publisher, developer FROM previews ORDER BY id DESC

Rod

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Reverse Ordering?


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 5 hosted by Hostway