[BNM] mysql grouping and ordering and limiting

Ali ali at nubz.com
Thu Jan 22 16:58:40 GMT 2009


Hi

 

Hopefully this is a quickie for someone, my first efforts are duds and
googling is a pain...

 

$q="select authorId, count(*) FROM blog WHERE 1 GROUP authorId";

 

Now I want to limit to, say 10 authors and order by count(*) descending -
can anyone indulge me with the syntax?

 

Ali



More information about the BNMlist mailing list. Powered by Wessex Networks