search and count values in column of mysql result set
I would like to search and count unique values in a column/fieldname of a MySQL Result Set.
In other words, when some lines of one table are stored in a mysql resultset I want to know which values are stored in开发者_开发百科 a specific column/fieldname of all stored lines.
SELECT COUNT(DISTINCT columnname) AS Total FROM yourtable
精彩评论