I am trying to echo the most common duplicates in a table. I have been able to echo the name of the duplicates but what I\'m looking for is a separate column in the table th
You could use an alias like this:
SELECT name, COUNT() as The_Count FROM pageinterests WHERE pageid = '$id' GROUP BY name HAVING COUNT() > 1 ORDER BY The_Count DESC;