4 ms·
Why don't country selectors use the free IP databases to pre-fill the country? It would reduce 90% of user input. After that just tally a daily table of "INSER
by fleitz 15y ago
Why don't country selectors use the free IP databases to pre-fill the country? It would reduce 90% of user input.
After that just tally a daily table of "INSERT INTO country_order (count,country) FROM (SELECT count(*),country from users)" and then do: "SELECT country FROM (((SELECT TOP 10 count,country FROM country_order order by count) UNION (SELECT 0 as count, country from country_order)) GROUP BY country) ORDER BY sum(count), country"
That should produce a country listing where the TOP 10 countries are ordered by their use and the rest are sorted alphabetically. The SQL might not be perfect but you get the idea.