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