Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 2000051

RE: [PHP3] "order by" Question From: Sam Masiello (smasiello <email protected>)
Date: 05/12/00

You can do that by just adding the second column to your order by statement
at the end of your query. Like this:

SELECT a, b
FROM table
WHERE .....
ORDER BY a, b ;

If you have more columns that you end up wanting to order by, just add them
to your order by list and separate the fields by commas.

Sam Masiello
System Analyst
Chek.Com
(716) 853-1362 x289
smasiello <email protected>

 -----Original Message-----
From: Steve Max [mailto:hoxis <email protected>]
Sent: Friday, May 12, 2000 11:46 AM
To: php3 <email protected>
Subject: [PHP3] "order by" Question

I guys,

is possible to get some results from a MySQL table order by two diferent
colums???

Example:

I have a MySQL table with some colums, but two of them are "Date" and the
other one "Time".
Now I want to make a selection order by Date, but then I want the result to
be order by Time too.

Thanks in advance
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>