On 12 Apr 2002, at 17:54, SED wrote:

> However, I want to get the result
> and then sort the result by importance e.g.:
> 
> result (date, name, impoartance):
> 
> 20020102, John, 3;
> 20020101, Smith, 5;
> 20010101, Sigmund, 1;
> 20000101, Sigmund, 8;
> 
> now I want to sort the result by importance (desc) so the final will be:
> 
> 20000101, Sigmund, 8;
> 20020101, Smith, 5;
> 20020102, John, 3;
> 20010101, Sigmund, 1;
> 
> Do you have any way of doing it?

Not in MySQL.  You'll have to use a program written in Perl or PHP
or some other language to sort the results again after you retrieve 
them.  It's a very strange thing to want to do: take the top 20 
records sorted in one way and then sort them by something else.  It 
seems to me that it would be confusing to whoever is looking at the 
results, but maybe I'm missing something.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to