How to mass edit and replace MySQL database row, replacing all using a list? -


so have list of 230 countries in database table called "countrylist" inside "country" row. besides "country" row, have "code" row, has country code of country in it.

the countries in english , since need country names in 3 other languages well, duplicated table 3 other languages too. programmed php code choose right table based on language.

i have list of country names in other 3 languages ready , have same ordering.

but... leaves me 230 countries replace in 3 languages, , that's lot of wasted time know should simpler basic copy pasting. although don't have slight clue of how or if can done...

i want know if there way preserve "code" row in tables , replace of countries in "country" row query/command?

thanks, appreciated

insert countries_fr (code) select countries_en.code countries_en 

assuming have tables countries_fr , countries_en, , both have code column. insert code countries_en table code of countries_fr table.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -