Použijte backtick(`) nebo Jedna uvozovka(') zadat alias název sloupce v MySQL.
Zkuste toto:
SELECT `id` AS 'key', `country_name` AS value
FROM countries;
NEBO
SELECT `id` AS `key`, `country_name` AS value
FROM countries;
Použijte backtick(`) nebo Jedna uvozovka(') zadat alias název sloupce v MySQL.
Zkuste toto:
SELECT `id` AS 'key', `country_name` AS value
FROM countries;
NEBO
SELECT `id` AS `key`, `country_name` AS value
FROM countries;