Mysql select most frequent and sort alphabetically
- by user2605793
I am trying to select the most common 100 names from a table then display the list showing the names and count. I want the user to be able to re-sort the list alphabetically rather than based on count.
I thought the following code would do it. It works for the default sort by count but fails on the sort alphabetically. The line "$count =…