RE: [PHP] Best way to sort?
| From: | Daniel Clark | Date: | Fri, 04 Jun 2004 12:18:49 +0000 |
| Subject: | RE: [PHP] Best way to sort? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187614@lists.php.net to get a copy of this message | ||
Order by the 2nd column
>>what is the 2? in the order by statement mean?
>>thanks
>>
>>-----Original Message-----
>>From: Raúl Castro [mailto:ora7@cdmb.gov.co]
>>Sent: Thursday, June 03, 2004 6:20 PM
>>To: php-general@lists.php.net
>>Subject: Re: [PHP] Best way to sort?
>>
>>
>>The best way is:
>>
>>SELECT person_name, count(*)
>>FROM table_name
>>GROUP BY person_name
>>ORDER BY 2 DESC