Re: ORDER BY Query
| From: | John W. Holmes | Date: | Fri, 05 Sep 2003 18:30:09 +0000 |
| Subject: | Re: ORDER BY Query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-30368@lists.php.net to get a copy of this message | ||
Shaun wrote:
I have a table in my database called Users. This table has (among others) two columns called Location and Name. Location will be either 1, 2, 3, or 4. How can I produce a query that groups the result into Location and then for each Location order the User by Name?Learn SQL, please. SELECT * FROM Table ORDER BY Location, Name -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com