Re: Sort array from a Query



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
.



Relevant Pages

  • Re: London Elevations?
    ... advertise a brewery - are the best coasters. ... I've never been in a bar or ... Them's beer mats. ...
    (alt.usage.english)
  • Re: London Elevations?
    ... advertise a brewery - are the best coasters. ... So you don't drip water all over yourself when you pick the glass up, or worse than water if you're drinking Guinness. ...
    (alt.usage.english)
  • Re: London Elevations?
    ... that advertise a brewery - are the best coasters. ... understood why coasters are needed in a pub, ... Are you trying to say that coasters and beer mats are different? ...
    (alt.usage.english)
  • Re: London Elevations?
    ... tony cooper wrote: ... advertise a brewery - are the best coasters. ...
    (alt.usage.english)
  • Re: Big 33 Football Game moving from Hershey? (On Topic)
    ... DCA Championships - sponsored by Pittsburgh (aka Iron City) Brewery ... does have nice ring to it..... ... Prev by Date: ...
    (rec.arts.marching.drumcorps)