In my database I have a table smf_members
Within that table is a column country_flag
Each user selects from a pulldown menu when registering their country and a small flag of that nation is then shown under their name when posting.
So, within the column country_flag the content varies for each member (e,g. gb us ca etc.)
I want to be able to do a database query that will return the total number of members for each country code so I can determine the breakdown of member's locations.
Any idea how I could achieve that? Any help would be greatly appreciated.
SELECT country_flag, COUNT(country_flag) AS number FROM smf_members GROUP BY country_flag;
Thank you very much for the swift response Arantor. It worked a treat.