|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Reverse Ordering? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|