countries icon indicating copy to clipboard operation
countries copied to clipboard

What do six names mean in a `name` column?

Open wzup opened this issue 7 years ago • 2 comments

How to understand and use it?

"Aruba,Aruba,Aruba,Aruba,Aruba,Aruba";".aw";"AW";"533";"ABW";"ARU";"AWG";"297";"Oranjestad";"AW";"Americas";

I create a table with that .csv. And I end up having more than one country name in a column name. How do I SELECT one country name?

Example:

SELECT ALL id, `name` FROM `countries`;

sqlyog ultimate - 2017-06-18 07 23 36

How do I get one English name of a country to create a <select> HTML element?

wzup avatar Jun 17 '17 23:06 wzup

@wzup I understand the problem, it's because the name property is a multidimensional array, and CSV does not support this type of structure, so I decided to flatten the array, but it's not very useful. I think I'll have to create multiple columns, name.common, name.official, and so on. What do you think?

For your information, the other formats do not have this problem.

mledoze avatar Jun 22 '17 07:06 mledoze

Hello @wzup I currently working on fixing this here https://github.com/mledoze/countries/pull/275.

There is still some work to do because some countries have more or less translations than others.

mledoze avatar Oct 25 '18 13:10 mledoze

This has been partly fixed in the 5.0.0 version. There is still a problem regarding the number of columns, see #497.

mledoze avatar Sep 21 '23 21:09 mledoze