Re: Multiple Sorts??
| From: | Petr Tomenendál | Date: | Tue, 10 Sep 2002 16:28:14 +0000 |
| Subject: | Re: Multiple Sorts?? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21676@lists.php.net to get a copy of this message | ||
> $result = mysql_query("SELECT * FROM pfiles WHERE cdate >= '2002-07-01'
> ORDER BY 'cdate' DESC", $link);
>
> I would like to be able to sort this data FIRST by 'cdate' then by 'vendor'
> Is this possible?
Yes.
Just add another sort criterium to your query like this:
$result = mysql_query("SELECT * FROM pfiles WHERE cdate >= '2002-07-01'
ORDER BY 'cdate' DESC, 'vendor' DESC", $link);
Petr.