![]() |
Fetching top amount of keywords
![]() Im looking for a way to show the results of this database like this: Top Keywords
Because, if you look at screenshot, Code has 3 entries ( so #1 ) MySQL has two entries ( #2 ) and then the rest under it :) I have this so far, but it doesnt work :( Code:
$q = mysql_query("SELECT COUNT(`id`) AS freq, `name` FROM `table` GROUP BY `name` ORDER BY freq ASC"); |
The sql doesnt seem to be the problem, although you may want to change it to DESC in order to get the most frequent first.
There are some errors in you script, you have not passed mysql_fetch_array a valid result link. PHP Code:
|
| All times are GMT. The time now is 05:55 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0