This situation has never occurred to me but there is always a first time.
The thing is that I have a field type select and I need to fill it with a list of countries, I already have the list but I have no idea how to do INSERT
of this magnitude in MySQL.
In my list of countries there are some hundred or so or 200 countries and I want to execute that query in a single query because you can imagine how tedious it would be to insert them one by one XD.
I tried this but only the table was created, it did not insert:
$counry=mysqli_query($conexion,"CREATE TABLE 'apps_countries' (
'id' int(11) NOT NULL auto_increment,
'country_code' varchar(2) NOT NULL default '',
'country_name' varchar(100) NOT NULL default '',
PRIMARY KEY ('id')
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
$insert_country=mysqli_query($conexion,"
INSERT INTO 'apps_countries' VALUES (null, 'AF', 'Afghanistan');
INSERT INTO 'apps_countries' VALUES (null, 'AL', 'Albania');
INSERT INTO 'apps_countries' VALUES (null, 'DZ', 'Algeria');
//etc.... a houndred something countries remaining
Any help?
Thanks!