Brug backtick(`) eller Enkelt citat(') for at give alias navn på kolonne i MySQL.
Prøv dette:
SELECT `id` AS 'key', `country_name` AS value
FROM countries;
ELLER
SELECT `id` AS `key`, `country_name` AS value
FROM countries;
Brug backtick(`) eller Enkelt citat(') for at give alias navn på kolonne i MySQL.
Prøv dette:
SELECT `id` AS 'key', `country_name` AS value
FROM countries;
ELLER
SELECT `id` AS `key`, `country_name` AS value
FROM countries;