Re: Most common entry in MySQL field
| From: | Folke Ashberg | Date: | Sat, 25 Nov 2000 20:44:19 +0000 |
| Subject: | Re: Most common entry in MySQL field | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27176@lists.php.net to get a copy of this message | ||
Do you mean the 5 fields with the hightest value?
then you should use
select max(the_field) as maximal from user group by uid
order by maximal desc
limit 5;
regards
Folke
--
Folke Ashberg
Stage Internet Services GmbH
Technical Development
folke@fanstage.de
folke@fanstage.de | Tel: +49 89 454591-77 | Fax: +49 89 454591-71
Kreillerstr. 21 | 81673 Munich | Germany | www.fanstage.de
On Sat, 25 Nov 2000, Tyler Longren wrote:
> Hello,
>
> This is probably more towards the SQL side, but how could I get the 5 most
> common entries in a MySQL field?
>
> Thanks,
> Tyler Longren
>
>
>