Re: Re: Tag Cloud (WAS Deviation? Distribution? OT?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
  $query = "select tag, popular from (select tag, count(*) as popular
from entry_tag group by tag order by popular desc limit 100) as p
order by tag";

I'm no expert, and I have no way to test this, but the following should work and gets shot of the sub-select...

select tag, count(1) as popular
from entry_tag
group by tag
order by popular desc, tag
limit 100

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux