Example: I have a search box on my webpage and all searchstring are saved in a 
database.

$foresp = mysql_query("SELECT string, COUNT(string) FROM searchstat GROUP BY string 
",$db);

while ($data = mysql_fetch_array($foresp)) { 
 echo "<br>($data[1]) " . str_replace('<', '&lt;', $data[string]) . " ";
}

However, I would like to write the result out with the most popular search strings 
first. Is it possible to sort the output by count(field_name) ?



Med venlig hilsen
Birger Langkjer
Dialogcentret

Reply via email to