Re: Sort array from a Query
- From: Ewoud Dronkert <firstname@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 18:49:31 +0100
bettina@xxxxxxxxxx wrote:
> coasters (ID,BREWERY_CODE, etc)
> breweries (BREWERY_CODE, BREWERY)
>
> For each brewery I want to count how many coasters are there in table
> "coasters" (up to here it works fine) and then I want to show them
> ordered by quantity (that's my problem):
Better ask database questions in comp.databases.mysql
select brewery, count(coasters.id) as cid from breweries inner join
coasters using(brewery_code) group by brewery order by cid
--
E. Dronkert
.
- References:
- Sort array from a Query
- From: bettina
- Sort array from a Query
- Prev by Date: Re: confused: casting a variable to integer
- Next by Date: Re: mktime fails for pre 1970 on Fedora 3
- Previous by thread: Sort array from a Query
- Next by thread: Re: Sort array from a Query
- Index(es):
Relevant Pages
|