Posted by meltedown on 10/11/05 09:46
meltedown wrote:
> I have a table called items with a field "brandid"
>
> I'm using mysql 3.23.58 which does not have COUNT();
>
> What statement can I use to find out which brandid occurs the most
> frequently?
>
>
I read in the manual that there is no COUNT() before 4.1.1, but I got
this to work, so I don't know aht the problem was.
$query2="SELECT brandid FROM items GROUP BY brandid ORDER BY COUNT(*)
LIMIT 1";
Navigation:
[Reply to this message]
|