CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
mySQL and order

 



widexl
Novice

May 14, 2001, 6:28 AM

Post #1 of 3 (289 views)
mySQL and order Can't Post

I want to sort my mySQL database

row one = 1
row two = 2

I use the follow comando

$sth = $dbh->prepare(SELECT * FROM $sql_member_data ORDER BY id);
$sth->execute();

this sort the database.
row one = 1
row two = 2

but I like to sort it backwards like below.
row two = 2
row one = 1

The highest first then the ones below.
Is there some way to sort a SQL database on this way.





Kanji
User / Moderator

May 14, 2001, 3:02 PM

Post #2 of 3 (285 views)
Re: mySQL and order [In reply to] Can't Post

You can use the keywords ASC and DESC (as in -ending) to alter the ORDER BY. See the MySQL docs for an example.



widexl
Novice

May 15, 2001, 7:38 AM

Post #3 of 3 (277 views)
Re: mySQL and order [In reply to] Can't Post

Thank, I have found it already.

I have to say
MySQL is nice


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives